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

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

Initial modifications to Pablo Compiler and Kernel Builder to support circular buffers for Lookahead.

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    void createKernels();
35    void ExecuteKernels();
36protected:
37
38    pablo::PabloFunction * generateLeadingFunction(const std::vector<unsigned> & endpoints);
39    pablo::PabloFunction * generateLookaheadFunction(const pablo::PabloFunction * const leading, const std::vector<unsigned> & endpoints);
40    pablo::PabloFunction * generateSortingFunction(const pablo::PabloFunction * const lookahead);
41
42private:
43    Module *                            mMod;
44    IDISA::IDISA_Builder *              iBuilder;
45    KernelBuilder *                     mS2PKernel;
46    KernelBuilder *                     mLeadingKernel;
47    KernelBuilder *                     mLookaheadKernel;
48    KernelBuilder *                     mSortingKernel;
49    int                                 mFileBufIdx;
50    int                                 mFileSizeIdx;
51    int                                 mFileNameIdx;
52    Type*                               mBitBlockType;
53    int                                 mBlockSize;
54};
55
56#endif // SYMBOLTABLEPIPELINE_H
Note: See TracBrowser for help on using the repository browser.