Ignore:
Timestamp:
May 7, 2017, 4:34:48 PM (2 years ago)
Author:
nmedfort
Message:

Continued refactoring work. PabloKernel? now abstract base type with a 'generatePabloMethod' hook to generate Pablo code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_builder.cpp

    r5435 r5436  
    2828    return CreateBitCast(a, ty);
    2929}
    30 
    31 std::string IDISA_Builder::getBitBlockTypeName() const {
    32     const auto type = getBitBlockType();
    33     if (type->isIntegerTy()) {
    34         return "i" + std::to_string(getBitBlockWidth());
    35     }
    36     assert("BitBlockType is neither integer nor vector" && type->isVectorTy());
    37     const auto fw = type->getScalarSizeInBits();
    38     return "v" + std::to_string(getBitBlockWidth() / fw) + "i" + std::to_string(fw);
    39 }
    40 
    4130
    4231void IDISA_Builder::CallPrintRegister(const std::string & name, Value * const value) {
     
    376365}
    377366
    378 void IDISA_Builder::initialize(llvm::Module * const module, unsigned archBitWidth, unsigned bitBlockWidth, unsigned stride) {
    379 
    380 }
    381 
    382 IDISA_Builder::IDISA_Builder(llvm::Module * const module, unsigned archBitWidth, unsigned bitBlockWidth, unsigned stride)
    383 : CBuilder(module, archBitWidth)
     367IDISA_Builder::IDISA_Builder(llvm::LLVMContext & C, unsigned archBitWidth, unsigned bitBlockWidth, unsigned stride)
     368: CBuilder(C, archBitWidth)
    384369, mBitBlockWidth(bitBlockWidth)
    385370, mStride(stride)
    386 , mBitBlockType(VectorType::get(IntegerType::get(module->getContext(), 64), bitBlockWidth / 64))
     371, mBitBlockType(VectorType::get(IntegerType::get(C, 64), bitBlockWidth / 64))
    387372, mZeroInitializer(Constant::getNullValue(mBitBlockType))
    388373, mOneInitializer(Constant::getAllOnesValue(mBitBlockType))
Note: See TracChangeset for help on using the changeset viewer.