Ignore:
Timestamp:
Mar 30, 2017, 1:22:39 PM (2 years ago)
Author:
nmedfort
Message:

Bug fixes for last check in

File:
1 edited

Legend:

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

    r5377 r5379  
    6363    Value * const inputStream = iBuilder->CreatePointerCast(getRawInputPointer("InputStream", iBuilder->getInt32(0), iBuilder->getInt32(0)), codeUnitTy);
    6464
    65     Value * fileSize = iBuilder->CreateAdd(getProcessedItemCount("InputStream"), getScalarField("PendingBytes"));
     65    Value * const fileSize = iBuilder->CreateAdd(getProcessedItemCount("InputStream"), getScalarField("PendingBytes"));
    6666
    6767    Constant * matchProcessor = nullptr;
     
    8080        default: llvm_unreachable("unknown grep type");
    8181    }
    82     Value * const matchesPtr = getInputStreamBlockPtr("matchResult", iBuilder->getInt32(0));
    83     Value * const matches = iBuilder->CreateBitCast(iBuilder->CreateBlockAlignedLoad(matchesPtr), scanwordVectorType);
    84 
    85     Value * const linebreaksPtr = getInputStreamBlockPtr("lineBreak", iBuilder->getInt32(0));
    86     Value * const linebreaks = iBuilder->CreateBitCast(iBuilder->CreateBlockAlignedLoad(linebreaksPtr), scanwordVectorType);
     82
     83    Value * const matches = iBuilder->CreateBitCast(loadInputStreamBlock("matchResult", iBuilder->getInt32(0)), scanwordVectorType);
     84    Value * const linebreaks = iBuilder->CreateBitCast(loadInputStreamBlock("lineBreak", iBuilder->getInt32(0)), scanwordVectorType);
    8785
    8886    iBuilder->CreateBr(scanWordIteration);
     
    206204        Value * nextScanwordPos = iBuilder->CreateAdd(phiScanwordPos, ConstantInt::get(sizeTy, sizeTy->getBitWidth()));
    207205        phiScanwordPos->addIncoming(nextScanwordPos, return_block);
    208 
    209206        Value * nextIndex = iBuilder->CreateAdd(phiIndex, iBuilder->getInt32(1));
    210207        phiIndex->addIncoming(nextIndex, return_block);
Note: See TracChangeset for help on using the changeset viewer.