Ignore:
Timestamp:
Apr 9, 2018, 5:01:04 PM (19 months ago)
Author:
nmedfort
Message:

fixes for minor compilation issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/lz4/lz4_block_decoder.cpp

    r5948 r5957  
    5858void LZ4BlockDecoderNewKernel::generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> &iBuilder, Value * const numOfStrides) {
    5959    // Constant
    60     Constant* INT8_0 = iBuilder->getInt8(0);
    61     Constant* INT8_1 = iBuilder->getInt8(1);
    6260    Constant* INT64_0 = iBuilder->getInt64(0);
    63 
    6461
    6562    BasicBlock * entryBlock = iBuilder->GetInsertBlock();
     
    9491    iBuilder->SetInsertPoint(processCon);
    9592
    96     PHINode* phiIsCompressed = iBuilder->CreatePHI(iBuilder->getInt8Ty(), 3);
    97     PHINode* phiBlockStart = iBuilder->CreatePHI(iBuilder->getInt64Ty(), 3);
    98     PHINode* phiBlockEnd = iBuilder->CreatePHI(iBuilder->getInt64Ty(), 3);
    99     PHINode* sOffset = iBuilder->CreatePHI(iBuilder->getSizeTy(), 3);
     93    PHINode* phiIsCompressed = iBuilder->CreatePHI(initIsCompressed->getType(), 3);
     94    PHINode* phiBlockStart = iBuilder->CreatePHI(initBlockStart->getType(), 3);
     95    PHINode* phiBlockEnd = iBuilder->CreatePHI(initBlockEnd->getType(), 3);
     96    PHINode* sOffset = iBuilder->CreatePHI(previousOffset->getType(), 3);
    10097
    10198    phiIsCompressed->addIncoming(initIsCompressed, entryBlock);
     
    119116    iBuilder->SetInsertPoint(storeOutputBlock);
    120117    this->appendOutput(iBuilder, phiIsCompressed, phiBlockStart, phiBlockEnd);
    121     phiIsCompressed->addIncoming(INT8_0, storeOutputBlock);
     118    phiIsCompressed->addIncoming(iBuilder->getFalse(), storeOutputBlock);
    122119    phiBlockStart->addIncoming(INT64_0, storeOutputBlock);
    123120    phiBlockEnd->addIncoming(INT64_0, storeOutputBlock);
     
    177174
    178175    sOffset->addIncoming(newOffset, iBuilder->GetInsertBlock());
    179     phiIsCompressed->addIncoming(iBuilder->CreateSelect(isCompressed, INT8_1, INT8_0), iBuilder->GetInsertBlock());
     176    phiIsCompressed->addIncoming(isCompressed, iBuilder->GetInsertBlock());
    180177    phiBlockStart->addIncoming(blockStart, iBuilder->GetInsertBlock());
    181178    phiBlockEnd->addIncoming(blockEnd, iBuilder->GetInsertBlock());
     
    204201    void LZ4BlockDecoderNewKernel::appendOutput(const std::unique_ptr<KernelBuilder> & iBuilder, Value* isCompressed, Value* blockStart, Value* blockEnd) {
    205202        // Constant
    206         this->generateStoreNumberOutput(iBuilder, "isCompressed", iBuilder->getInt8Ty()->getPointerTo(), isCompressed);
     203        this->generateStoreNumberOutput(iBuilder, "isCompressed", iBuilder->getInt1Ty()->getPointerTo(), isCompressed);
    207204        this->generateStoreNumberOutput(iBuilder, "blockStart", iBuilder->getInt64Ty()->getPointerTo(), blockStart);
    208205        this->generateStoreNumberOutput(iBuilder, "blockEnd", iBuilder->getInt64Ty()->getPointerTo(), blockEnd);
Note: See TracChangeset for help on using the changeset viewer.