source: icGREP/icgrep-devel/icgrep/toolchain.h @ 5295

Last change on this file since 5295 was 5295, checked in by cameron, 3 years ago

Debug Options: SerializeThreads?; unify ShowIR, ShowPablo?, ShowREs, ShowASM

File size: 1.1 KB
Line 
1/*
2 *  Copyright (c) 2015 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#ifndef TOOLCHAIN_H
8#define TOOLCHAIN_H
9#include <string>
10namespace llvm { class ExecutionEngine; }
11namespace llvm { class Module; }
12namespace llvm { namespace cl { class OptionCategory; } }
13
14namespace codegen {
15const llvm::cl::OptionCategory * codegen_flags();
16
17// Command Parameters
18enum DebugFlags {
19    ShowIR,
20#if LLVM_VERSION_MINOR > 6
21    ShowASM,
22#endif
23    SerializeThreads
24};
25
26bool DebugOptionIsSet(DebugFlags flag);
27
28
29extern char OptLevel;  // set from command line
30extern int BlockSize;  // set from command line
31extern int SegmentSize;  // set from command line
32extern int BufferSegments;
33extern int ThreadNum;
34#ifdef CUDA_ENABLED
35extern bool NVPTX;
36#endif
37}
38
39#ifdef CUDA_ENABLED
40void setNVPTXOption();
41void Compile2PTX (llvm::Module * m, std::string IRFilename, std::string PTXFilename);
42#endif
43
44bool AVX2_available();
45
46llvm::ExecutionEngine * JIT_to_ExecutionEngine (llvm::Module * m);
47
48void ApplyObjectCache(llvm::ExecutionEngine * e);
49
50#endif
Note: See TracBrowser for help on using the repository browser.