source: icGREP/icgrep-devel/icgrep/kernels/symboltablepipeline.h @ 4968

Last change on this file since 4968 was 4968, checked in by nmedfort, 3 years ago

Some fixes for threading and kernel builder.

File size: 1.7 KB
Line 
1/*
2 *  Copyright (c) 2016 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 */
5
6#ifndef SYMBOLTABLEPIPELINE_H
7#define SYMBOLTABLEPIPELINE_H
8
9#include <IDISA/idisa_builder.h>
10#include <llvm/IR/Function.h>
11#include <llvm/IR/Module.h>
12#include "kernel.h"
13
14namespace llvm {
15    class Value;
16    class Module;
17    class ExecutionEngine;
18    class VectorType;
19    class PointerType;
20    class Constant;
21    class FunctionType;
22    class Function;
23    class BasicBlock;
24    class Type;
25}
26
27namespace pablo { class PabloFunction; class PabloBlock; }
28
29using namespace llvm;
30
31class SymbolTableBuilder {
32public:
33    SymbolTableBuilder(Module * m, IDISA::IDISA_Builder * b);
34    ~SymbolTableBuilder();
35    void createKernels();
36    void ExecuteKernels();
37protected:
38
39    pablo::PabloFunction * generateLeadingFunction(const std::vector<unsigned> & endpoints);
40    pablo::PabloFunction * generateSortingFunction(const pablo::PabloFunction * const leading, const std::vector<unsigned> & endpoints);
41
42    void generateLLVMParser();
43
44private:
45    Module *                            mMod;
46    IDISA::IDISA_Builder *              iBuilder;
47    KernelBuilder *                     mS2PKernel;
48    KernelBuilder *                     mLeadingKernel;
49    KernelBuilder *                     mSortingKernel;
50    unsigned                            mLongestLookahead;
51    int                                 mFileBufIdx;
52    int                                 mFileSizeIdx;
53    int                                 mFileNameIdx;
54    Type*                               mBitBlockType;
55    int                                 mBlockSize;
56};
57
58#endif // SYMBOLTABLEPIPELINE_H
Note: See TracBrowser for help on using the repository browser.