Ignore:
Timestamp:
Jul 13, 2015, 3:55:59 PM (4 years ago)
Author:
nmedfort
Message:

Made pablo compiler reenterant through alternate compile method that takes a Module parameter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IDISA/idisa_builder.h

    r4662 r4665  
    1818class IDISA_Builder {
    1919public:
    20     IDISA_Builder(Module * m, IRBuilder <> * b, Type * bitBlockType): mMod(m), llvm_builder(b), mBitBlockType(bitBlockType) {
    21         if (bitBlockType->isIntegerTy()) mBitBlockSize = dyn_cast<IntegerType>(bitBlockType)-> getIntegerBitWidth();
    22         else mBitBlockSize = dyn_cast<VectorType>(bitBlockType)-> getBitWidth();
     20
     21    IDISA_Builder(Type * bitBlockType)
     22    : mMod(nullptr)
     23    , mLLVMBuilder(nullptr)
     24    , mBitBlockType(bitBlockType)
     25    , mBitBlockSize(bitBlockType->isIntegerTy() ? cast<IntegerType>(bitBlockType)->getIntegerBitWidth() : cast<VectorType>(bitBlockType)->getBitWidth()) {
     26
     27    }
     28
     29    void initialize(Module * m, IRBuilder <> * b) {
     30        mMod = m;
     31        mLLVMBuilder = b;
    2332    }
    2433       
     
    5665private:
    5766    Module * mMod;
    58     IRBuilder <> * llvm_builder;
     67    IRBuilder <> * mLLVMBuilder;
    5968    Type * mBitBlockType;
    6069    unsigned mBitBlockSize;
Note: See TracChangeset for help on using the changeset viewer.