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

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

Parabix version info, unique names for IDISA builders

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