Ignore:
Timestamp:
Jan 31, 2017, 4:08:11 PM (2 years ago)
Author:
nmedfort
Message:

Removed 'function' and 'self' parameters from generateXXXMethod() functions.

File:
1 edited

Legend:

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

    r5285 r5292  
    3838}
    3939       
    40 void ScanMatchKernel::generateDoBlockMethod(Function * function, Value * self, Value * blockNo) const {
     40void ScanMatchKernel::generateDoBlockMethod(Value * blockNo) {
    4141
    4242    auto savePoint = iBuilder->saveIP();
     
    4848    Type * scanwordVectorType =  VectorType::get(T, fieldCount);
    4949    Value * scanwordPos = iBuilder->CreateMul(blockNo, ConstantInt::get(blockNo->getType(), iBuilder->getBitBlockWidth()));   
    50     Value * recordStart = getScalarField(self, "LineStart");
    51     Value * recordNum = getScalarField(self, "LineNum");
    52     Value * matches = iBuilder->CreateBlockAlignedLoad(getStream(self, "matchResults", blockNo, iBuilder->getInt32(0)));
    53     Value * linebreaks = iBuilder->CreateBlockAlignedLoad(getStream(self, "matchResults", blockNo, iBuilder->getInt32(1)));
     50    Value * recordStart = getScalarField("LineStart");
     51    Value * recordNum = getScalarField("LineNum");
     52    Value * matches = iBuilder->CreateBlockAlignedLoad(getStream("matchResults", blockNo, iBuilder->getInt32(0)));
     53    Value * linebreaks = iBuilder->CreateBlockAlignedLoad(getStream("matchResults", blockNo, iBuilder->getInt32(1)));
    5454    Value * matchWordVector = iBuilder->CreateBitCast(matches, scanwordVectorType);
    5555    Value * breakWordVector = iBuilder->CreateBitCast(linebreaks, scanwordVectorType);
     
    5757        Value * matchWord = iBuilder->CreateExtractElement(matchWordVector, ConstantInt::get(T, i));
    5858        Value * recordBreaksWord = iBuilder->CreateExtractElement(breakWordVector, ConstantInt::get(T, i));
    59         Value * wordResult = iBuilder->CreateCall(scanWordFunction, {self, matchWord, recordBreaksWord, scanwordPos, recordStart, recordNum});
     59        Value * wordResult = iBuilder->CreateCall(scanWordFunction, {getSelf(), matchWord, recordBreaksWord, scanwordPos, recordStart, recordNum});
    6060        scanwordPos = iBuilder->CreateAdd(scanwordPos, ConstantInt::get(T, T->getBitWidth()));
    6161        recordStart = iBuilder->CreateExtractValue(wordResult, std::vector<unsigned>({0}));
    6262        recordNum = iBuilder->CreateExtractValue(wordResult, std::vector<unsigned>({1}));
    6363    }
    64     setScalarField(self, "LineStart", recordStart);
    65     setScalarField(self, "LineNum", recordNum);
     64    setScalarField("LineStart", recordStart);
     65    setScalarField("LineNum", recordNum);
    6666}
    6767
Note: See TracChangeset for help on using the changeset viewer.