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

Last change on this file since 5347 was 5347, checked in by nmedfort, 2 years ago

Added enable asserts (-ea) command line flag + restructured BlockOrientedKernels? to allow for inlined code.

File size: 1.2 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;
34extern bool EnableAsserts;
35#ifdef CUDA_ENABLED
36extern bool NVPTX;
37extern int GroupNum;
38#endif
39}
40
41#ifdef CUDA_ENABLED
42void setNVPTXOption();
43void Compile2PTX (llvm::Module * m, std::string IRFilename, std::string PTXFilename);
44#endif
45
46bool AVX2_available();
47
48llvm::ExecutionEngine * JIT_to_ExecutionEngine (llvm::Module * m);
49
50void ApplyObjectCache(llvm::ExecutionEngine * e);
51
52#endif
Note: See TracBrowser for help on using the repository browser.