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

Last change on this file since 5380 was 5373, checked in by cameron, 2 years ago

Parabix version info, unique names for IDISA builders

File size: 1.4 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>
10#include <IR_Gen/idisa_builder.h>
11
12namespace llvm { class ExecutionEngine; }
13namespace llvm { class Module; }
14namespace llvm { namespace cl { class OptionCategory; } }
15namespace IDISA { class IDISA_Builder; }
16namespace kernel { class KernelBuilder; }
17
18namespace codegen {
19const llvm::cl::OptionCategory * codegen_flags();
20
21// Command Parameters
22enum DebugFlags {
23    ShowIR,
24#if LLVM_VERSION_MINOR > 6
25    ShowASM,
26#endif
27    SerializeThreads
28};
29
30bool DebugOptionIsSet(DebugFlags flag);
31
32
33extern char OptLevel;  // set from command line
34extern int BlockSize;  // set from command line
35extern int SegmentSize;  // set from command line
36extern int BufferSegments;
37extern int ThreadNum;
38extern bool EnableAsserts;
39#ifdef CUDA_ENABLED
40extern bool NVPTX;
41extern int GroupNum;
42#endif
43}
44
45#ifdef CUDA_ENABLED
46void setNVPTXOption();
47void Compile2PTX (llvm::Module * m, std::string IRFilename, std::string PTXFilename);
48#endif
49
50void AddParabixVersionPrinter();
51
52bool AVX2_available();
53
54llvm::ExecutionEngine * JIT_to_ExecutionEngine (llvm::Module * m);
55
56void ApplyObjectCache(llvm::ExecutionEngine * e);
57
58void generatePipeline(IDISA::IDISA_Builder * iBuilder, const std::vector<kernel::KernelBuilder *> & kernels);
59
60#endif
Note: See TracBrowser for help on using the repository browser.