Changeset 6022


Ignore:
Timestamp:
May 7, 2018, 3:22:05 PM (3 months ago)
Author:
xwa163
Message:

Performance improvement for M0 marker bit output logic in LZ4IndexBuilderKernel

Location:
icGREP/icgrep-devel/icgrep/kernels/lz4
Files:
2 edited

Legend:

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

    r6020 r6022  
    1515namespace kernel{
    1616
    17     LZ4IndexBuilderKernel::LZ4IndexBuilderKernel(const std::unique_ptr<kernel::KernelBuilder> &iBuilder)
     17    LZ4IndexBuilderKernel::LZ4IndexBuilderKernel(const std::unique_ptr<kernel::KernelBuilder> &b)
    1818    : SegmentOrientedKernel("LZ4IndexBuilderKernel",
    1919    // Inputs
    2020    {
    21            Binding{iBuilder->getStreamSetTy(1, 8), "byteStream", BoundedRate(0, 1)},
    22            Binding{iBuilder->getStreamSetTy(1, 1), "extender", RateEqualTo("byteStream")},
     21           Binding{b->getStreamSetTy(1, 8), "byteStream", BoundedRate(0, 1)},
     22           Binding{b->getStreamSetTy(1, 1), "extender", RateEqualTo("byteStream")},
    2323
    2424           // block data
    25            Binding{iBuilder->getStreamSetTy(1, 1), "isCompressed", BoundedRate(0, 1), AlwaysConsume()},
    26            Binding{iBuilder->getStreamSetTy(1, 64), "blockStart", RateEqualTo("isCompressed"), AlwaysConsume()},
    27            Binding{iBuilder->getStreamSetTy(1, 64), "blockEnd", RateEqualTo("isCompressed"), AlwaysConsume()}
     25           Binding{b->getStreamSetTy(1, 1), "isCompressed", BoundedRate(0, 1), AlwaysConsume()},
     26           Binding{b->getStreamSetTy(1, 64), "blockStart", RateEqualTo("isCompressed"), AlwaysConsume()},
     27           Binding{b->getStreamSetTy(1, 64), "blockEnd", RateEqualTo("isCompressed"), AlwaysConsume()}
    2828
    2929    },
     
    3131    {
    3232           // Uncompressed_data
    33            Binding{iBuilder->getStreamSetTy(1, 64), "uncompressedStartPos",
     33           Binding{b->getStreamSetTy(1, 64), "uncompressedStartPos",
    3434                   BoundedRate(0, 1)},
    35            Binding{iBuilder->getStreamSetTy(1, 64), "uncompressedLength",
     35           Binding{b->getStreamSetTy(1, 64), "uncompressedLength",
    3636                   BoundedRate(0, 1)},
    37            Binding{iBuilder->getStreamSetTy(1, 64), "uncompressedOutputPos",
     37           Binding{b->getStreamSetTy(1, 64), "uncompressedOutputPos",
    3838                   BoundedRate(0, 1)},
    3939
    40            Binding{iBuilder->getStreamSetTy(1, 1), "deletionMarker", BoundedRate(0, 1)},
    41            Binding{iBuilder->getStreamSetTy(1, 1), "M0Marker", BoundedRate(0, 1)},
    42            Binding{iBuilder->getStreamSetTy(1, 1), "MatchOffsetMarker", RateEqualTo("byteStream")}
     40           Binding{b->getStreamSetTy(1, 1), "deletionMarker", BoundedRate(0, 1)},
     41           Binding{b->getStreamSetTy(1, 1), "M0Marker", BoundedRate(0, 1)},
     42           Binding{b->getStreamSetTy(1, 1), "MatchOffsetMarker", RateEqualTo("byteStream")}
    4343    },
    4444    //Arguments
    4545    {
    46            Binding{iBuilder->getSizeTy(), "fileSize"}
     46           Binding{b->getSizeTy(), "fileSize"}
    4747    },
    4848    {},
    4949    //Internal states:
    5050    {
    51            Binding{iBuilder->getSizeTy(), "blockDataIndex"},
    52            Binding{iBuilder->getInt64Ty(), "m0OutputPos"},
    53            Binding{iBuilder->getInt64Ty(), "compressedSpaceClearPos"}
     51           Binding{b->getSizeTy(), "blockDataIndex"},
     52           Binding{b->getInt64Ty(), "m0OutputPos"},
     53           Binding{b->getInt64Ty(), "compressedSpaceClearPos"},
     54
     55           // For M0 output
     56           Binding{b->getIntNTy(64), "pendingM0StartBits"},
     57           Binding{b->getIntNTy(64), "pendingM0EndBits"},
     58           Binding{b->getIntNTy(64), "pendingM0CarryBit"},
     59           Binding{b->getInt64Ty(), "pendingM0Index"},
     60
     61
    5462    }) {
    5563        this->setStride(4 * 1024 * 1024);
     
    5765    }
    5866
    59     void LZ4IndexBuilderKernel::generateDoSegmentMethod(const std::unique_ptr<KernelBuilder> &iBuilder) {
    60         BasicBlock* exitBlock = iBuilder->CreateBasicBlock("exitBlock");
    61         BasicBlock* blockEndConBlock = iBuilder->CreateBasicBlock("blockEndConBlock");
    62 
    63         Value * blockDataIndex = iBuilder->getScalarField("blockDataIndex");
     67    void LZ4IndexBuilderKernel::generateDoSegmentMethod(const std::unique_ptr<KernelBuilder> &b) {
     68        BasicBlock* exitBlock = b->CreateBasicBlock("exitBlock");
     69        BasicBlock* blockEndConBlock = b->CreateBasicBlock("blockEndConBlock");
     70
     71        Value * blockDataIndex = b->getScalarField("blockDataIndex");
    6472
    6573        // In MultiblockKernel, availableItemCount + processedItemCount == producedItemCount from previous kernel
    6674        // While in SegmentOrigentedKernel, availableItemCount == producedItemCount from previous kernel
    67         Value * totalNumber = iBuilder->getAvailableItemCount("blockEnd");
    68         Value * totalExtender = iBuilder->getAvailableItemCount("extender");
    69 
    70         Value * blockEnd = this->generateLoadInt64NumberInput(iBuilder, "blockEnd", blockDataIndex);
    71 
    72         iBuilder->CreateCondBr(iBuilder->CreateICmpULT(blockDataIndex, totalNumber), blockEndConBlock, exitBlock);
    73 
    74         iBuilder->SetInsertPoint(blockEndConBlock);
    75         Value * blockStart = this->generateLoadInt64NumberInput(iBuilder, "blockStart", blockDataIndex);
    76         BasicBlock * processBlock = iBuilder->CreateBasicBlock("processBlock");
    77         iBuilder->CreateCondBr(iBuilder->CreateICmpULE(blockEnd, totalExtender), processBlock, exitBlock);
    78 
    79         iBuilder->SetInsertPoint(processBlock);
     75        Value * totalNumber = b->getAvailableItemCount("blockEnd");
     76        Value * totalExtender = b->getAvailableItemCount("extender");
     77
     78        Value * blockEnd = this->generateLoadInt64NumberInput(b, "blockEnd", blockDataIndex);
     79
     80        b->CreateCondBr(b->CreateICmpULT(blockDataIndex, totalNumber), blockEndConBlock, exitBlock);
     81
     82        b->SetInsertPoint(blockEndConBlock);
     83        Value * blockStart = this->generateLoadInt64NumberInput(b, "blockStart", blockDataIndex);
     84        BasicBlock * processBlock = b->CreateBasicBlock("processBlock");
     85        b->CreateCondBr(b->CreateICmpULE(blockEnd, totalExtender), processBlock, exitBlock);
     86
     87        b->SetInsertPoint(processBlock);
    8088
    8189        //TODO handle uncompressed block
    8290
    83         this->generateProcessCompressedBlock(iBuilder, blockStart, blockEnd);
    84 
    85         Value * newBlockDataIndex = iBuilder->CreateAdd(blockDataIndex, iBuilder->getInt64(1));
    86         iBuilder->setScalarField("blockDataIndex", newBlockDataIndex);
    87         iBuilder->setProcessedItemCount("isCompressed", newBlockDataIndex);
    88 //        iBuilder->setProcessedItemCount("blockEnd", newBlockDataIndex);
    89 //        iBuilder->setProcessedItemCount("blockStart", newBlockDataIndex);
    90 
    91         iBuilder->setProcessedItemCount("byteStream", blockEnd);
    92         iBuilder->CreateBr(exitBlock);
    93 
    94         iBuilder->SetInsertPoint(exitBlock);
    95     }
    96 
    97     Value* LZ4IndexBuilderKernel::processLiteral(const std::unique_ptr<KernelBuilder> &iBuilder, Value* token, Value* tokenPos, Value* blockEnd) {
    98 //        iBuilder->CallPrintInt("blockEnd", blockEnd);
    99         BasicBlock* entryBlock = iBuilder->GetInsertBlock();
    100 
    101         Value * extendedLiteralValue = iBuilder->CreateICmpEQ(iBuilder->CreateAnd(token, iBuilder->getInt8(0xf0)), iBuilder->getInt8(0xf0));
    102 
    103         BasicBlock* extendLiteralLengthCon = iBuilder->CreateBasicBlock("block_data_loop_handle_compressed_block_extend_literal_length_con");
    104         BasicBlock* extendLiteralLengthBody = iBuilder->CreateBasicBlock("block_data_loop_handle_compressed_block_extend_literal_length_body");
    105         BasicBlock* extendLiteralLengthExit = iBuilder->CreateBasicBlock("block_data_loop_handle_compressed_block_extend_literal_length_exit");
    106 
    107         iBuilder->CreateCondBr(extendedLiteralValue, extendLiteralLengthCon, extendLiteralLengthExit);
    108 
    109         iBuilder->SetInsertPoint(extendLiteralLengthCon);
    110 
    111         Value * const nextTokenPos = iBuilder->CreateAdd(tokenPos, iBuilder->getInt64(1));
    112         Value * const nextToken = iBuilder->CreateLoad(iBuilder->getRawInputPointer("byteStream", nextTokenPos));
    113         Value * const isExitToken = iBuilder->CreateICmpNE(nextToken, iBuilder->getInt8(0xff));
    114         iBuilder->CreateLikelyCondBr(isExitToken, extendLiteralLengthExit, extendLiteralLengthBody);
    115 
    116 
    117         iBuilder->SetInsertPoint(extendLiteralLengthBody);
    118         Value* newCursorPos2 = this->advanceUntilNextZero(iBuilder, "extender", iBuilder->CreateAdd(tokenPos, iBuilder->getInt64(1)), blockEnd);
    119         BasicBlock* advanceFinishBlock = iBuilder->GetInsertBlock();
    120 
    121 
    122         iBuilder->CreateBr(extendLiteralLengthExit);
    123 
    124         iBuilder->SetInsertPoint(extendLiteralLengthExit);
    125         PHINode* phiCursorPosAfterLiteral = iBuilder->CreatePHI(iBuilder->getInt64Ty(), 3);
     91        this->generateProcessCompressedBlock(b, blockStart, blockEnd);
     92        this->storePendingM0(b);
     93        Value * newBlockDataIndex = b->CreateAdd(blockDataIndex, b->getInt64(1));
     94        b->setScalarField("blockDataIndex", newBlockDataIndex);
     95        b->setProcessedItemCount("isCompressed", newBlockDataIndex);
     96//        b->setProcessedItemCount("blockEnd", newBlockDataIndex);
     97//        b->setProcessedItemCount("blockStart", newBlockDataIndex);
     98
     99        b->setProcessedItemCount("byteStream", blockEnd);
     100        b->CreateBr(exitBlock);
     101
     102        b->SetInsertPoint(exitBlock);
     103    }
     104
     105    Value* LZ4IndexBuilderKernel::processLiteral(const std::unique_ptr<KernelBuilder> &b, Value* token, Value* tokenPos, Value* blockEnd) {
     106//        b->CallPrintInt("blockEnd", blockEnd);
     107        BasicBlock* entryBlock = b->GetInsertBlock();
     108
     109        Value * extendedLiteralValue = b->CreateICmpEQ(b->CreateAnd(token, b->getInt8(0xf0)), b->getInt8(0xf0));
     110
     111        BasicBlock* extendLiteralLengthCon = b->CreateBasicBlock("block_data_loop_handle_compressed_block_extend_literal_length_con");
     112        BasicBlock* extendLiteralLengthBody = b->CreateBasicBlock("block_data_loop_handle_compressed_block_extend_literal_length_body");
     113        BasicBlock* extendLiteralLengthExit = b->CreateBasicBlock("block_data_loop_handle_compressed_block_extend_literal_length_exit");
     114
     115        b->CreateCondBr(extendedLiteralValue, extendLiteralLengthCon, extendLiteralLengthExit);
     116
     117        b->SetInsertPoint(extendLiteralLengthCon);
     118
     119        Value * const nextTokenPos = b->CreateAdd(tokenPos, b->getInt64(1));
     120        Value * const nextToken = b->CreateLoad(b->getRawInputPointer("byteStream", nextTokenPos));
     121        Value * const isExitToken = b->CreateICmpNE(nextToken, b->getInt8(0xff));
     122        b->CreateLikelyCondBr(isExitToken, extendLiteralLengthExit, extendLiteralLengthBody);
     123
     124
     125        b->SetInsertPoint(extendLiteralLengthBody);
     126        Value* newCursorPos2 = this->advanceUntilNextZero(b, "extender", b->CreateAdd(tokenPos, b->getInt64(1)), blockEnd);
     127        BasicBlock* advanceFinishBlock = b->GetInsertBlock();
     128
     129
     130        b->CreateBr(extendLiteralLengthExit);
     131
     132        b->SetInsertPoint(extendLiteralLengthExit);
     133        PHINode* phiCursorPosAfterLiteral = b->CreatePHI(b->getInt64Ty(), 3);
    126134        phiCursorPosAfterLiteral->addIncoming(nextTokenPos, extendLiteralLengthCon);
    127135        phiCursorPosAfterLiteral->addIncoming(newCursorPos2, advanceFinishBlock);
    128136        phiCursorPosAfterLiteral->addIncoming(tokenPos, entryBlock);
    129137
    130         Value * literalExtensionSize = iBuilder->CreateSub(phiCursorPosAfterLiteral, tokenPos);
    131         Value * finalLengthByte = this->generateLoadSourceInputByte(iBuilder, phiCursorPosAfterLiteral);
    132         finalLengthByte = iBuilder->CreateZExt(finalLengthByte, iBuilder->getInt64Ty());
    133         Value * literalLengthExtendValue = iBuilder->CreateSelect(
    134                 iBuilder->CreateICmpUGT(literalExtensionSize, iBuilder->getSize(0)),
    135                 iBuilder->CreateAdd(
    136                         iBuilder->CreateMul(
    137                                 iBuilder->CreateSub(literalExtensionSize, iBuilder->getSize(1)),
    138                                 iBuilder->getSize(255)
     138        Value * literalExtensionSize = b->CreateSub(phiCursorPosAfterLiteral, tokenPos);
     139        Value * finalLengthByte = this->generateLoadSourceInputByte(b, phiCursorPosAfterLiteral);
     140        finalLengthByte = b->CreateZExt(finalLengthByte, b->getInt64Ty());
     141        Value * literalLengthExtendValue = b->CreateSelect(
     142                b->CreateICmpUGT(literalExtensionSize, b->getSize(0)),
     143                b->CreateAdd(
     144                        b->CreateMul(
     145                                b->CreateSub(literalExtensionSize, b->getSize(1)),
     146                                b->getSize(255)
    139147                        ),
    140148                        finalLengthByte
    141149                ),
    142                 iBuilder->getSize(0)
     150                b->getSize(0)
    143151        );
    144         literalLengthExtendValue = iBuilder->CreateZExt(literalLengthExtendValue, iBuilder->getInt64Ty());
    145         Value* literalLengthBase = iBuilder->CreateLShr(iBuilder->CreateZExt(token, iBuilder->getInt64Ty()), iBuilder->getInt64(4));
    146         Value* literalLength = iBuilder->CreateAdd(literalLengthBase, literalLengthExtendValue);
    147 
    148         Value* offsetPos = iBuilder->CreateAdd(
    149                 iBuilder->CreateAdd(
     152        literalLengthExtendValue = b->CreateZExt(literalLengthExtendValue, b->getInt64Ty());
     153        Value* literalLengthBase = b->CreateLShr(b->CreateZExt(token, b->getInt64Ty()), b->getInt64(4));
     154        Value* literalLength = b->CreateAdd(literalLengthBase, literalLengthExtendValue);
     155
     156        Value* offsetPos = b->CreateAdd(
     157                b->CreateAdd(
    150158                        phiCursorPosAfterLiteral,
    151159                        literalLength),
    152                 iBuilder->getSize(1));
    153 
    154         this->setCircularOutputBitstream(iBuilder, "deletionMarker", iBuilder->getProducedItemCount("deletionMarker"), iBuilder->CreateAdd(phiCursorPosAfterLiteral, iBuilder->getSize(1)));
    155 
    156         iBuilder->setProducedItemCount("deletionMarker", offsetPos);
    157         this->increaseScalarField(iBuilder, "m0OutputPos", literalLength); //TODO m0OutputPos may be removed from scalar fields
     160                b->getSize(1));
     161
     162        this->setCircularOutputBitstream(b, "deletionMarker", b->getProducedItemCount("deletionMarker"), b->CreateAdd(phiCursorPosAfterLiteral, b->getSize(1)));
     163
     164        b->setProducedItemCount("deletionMarker", offsetPos);
     165        this->increaseScalarField(b, "m0OutputPos", literalLength); //TODO m0OutputPos may be removed from scalar fields
    158166        return offsetPos;
    159167    }
     
    227235        this->markCircularOutputBitstream(iBuilder, "MatchOffsetMarker", offsetPos);
    228236        this->increaseScalarField(iBuilder, "m0OutputPos", matchLength);
    229         this->setCircularOutputBitstream(iBuilder, "M0Marker", outputPos, outputEndPos);
     237//        this->setCircularOutputBitstream(iBuilder, "M0Marker", outputPos, outputEndPos);
     238        this->appendM0Output(iBuilder, outputPos, outputEndPos);
    230239
    231240        return iBuilder->CreateAdd(phiCursorPosAfterMatch, INT64_ONE);
     
    241250        BasicBlock* entryBlock = iBuilder->GetInsertBlock();
    242251
    243         Value* m0OutputBlockPtr = iBuilder->getOutputStreamBlockPtr("M0Marker", iBuilder->getSize(0));
    244         iBuilder->CreateMemSet(m0OutputBlockPtr, iBuilder->getInt8(0), 4 * 1024 * 1024 / 8, true);
     252//        Value* m0OutputBlockPtr = iBuilder->getOutputStreamBlockPtr("M0Marker", iBuilder->getSize(0));
     253//        iBuilder->CreateMemSet(m0OutputBlockPtr, iBuilder->getInt8(0), 4 * 1024 * 1024 / 8, true);
    245254
    246255
     
    560569    }
    561570
     571    void LZ4IndexBuilderKernel::appendM0Output(const std::unique_ptr<KernelBuilder> &b, llvm::Value *start, llvm::Value *end) {
     572        // ---- Entry
     573        // Constant
     574
     575        int fw = 64;
     576        BasicBlock* entryBlock = b->GetInsertBlock();
     577        Value* SIZE_1 = b->getSize(1);
     578        Value* SIZE_256 = b->getSize(fw);
     579        Value* INT256_0 = b->getIntN(fw, 0);
     580        Value* INT256_1 = b->getIntN(fw, 1);
     581
     582        Value* startBlockIndex = b->CreateUDiv(start, SIZE_256);
     583        Value* startOffset = b->CreateZExt(b->CreateURem(start, SIZE_256), b->getIntNTy(fw));
     584        Value* endBlockIndex = b->CreateUDiv(end, SIZE_256);
     585        Value* endOffset = b->CreateZExt(b->CreateURem(end, SIZE_256), b->getIntNTy(fw));
     586
     587
     588        BasicBlock* appendM0Con = b->CreateBasicBlock("appendM0Con");
     589        BasicBlock* appendM0Body = b->CreateBasicBlock("appendM0Body");
     590        BasicBlock* appendM0Exit = b->CreateBasicBlock("appendM0Exit");
     591
     592        Value* pendingM0Index = b->getScalarField("pendingM0Index");
     593        Value* pendingM0StartBits = b->getScalarField("pendingM0StartBits");
     594        Value* pendingM0EndBits = b->getScalarField("pendingM0EndBits");
     595        Value* pendingM0CarryBit = b->getScalarField("pendingM0CarryBit");
     596
     597        b->CreateBr(appendM0Con);
     598
     599        // ---- AppendM0Con
     600        b->SetInsertPoint(appendM0Con);
     601        PHINode* phiCurrentIndex = b->CreatePHI(b->getSizeTy(), 2);
     602        phiCurrentIndex->addIncoming(pendingM0Index, entryBlock);
     603        PHINode* phiStartBits = b->CreatePHI(b->getIntNTy(fw), 2);
     604        phiStartBits->addIncoming(pendingM0StartBits, entryBlock);
     605        PHINode* phiEndBits = b->CreatePHI(b->getIntNTy(fw), 2);
     606        phiEndBits->addIncoming(pendingM0EndBits, entryBlock);
     607        PHINode* phiCarryBit = b->CreatePHI(b->getIntNTy(fw), 2);
     608        phiCarryBit->addIncoming(pendingM0CarryBit, entryBlock);
     609
     610
     611        b->CreateUnlikelyCondBr(b->CreateICmpULT(phiCurrentIndex, endBlockIndex), appendM0Body, appendM0Exit);
     612        // ---- AppendM0Body
     613        b->SetInsertPoint(appendM0Body);
     614        Value* actualStartBits = b->CreateSelect(b->CreateICmpEQ(phiCurrentIndex, startBlockIndex), b->CreateOr(phiStartBits, b->CreateShl(INT256_1, startOffset)), phiStartBits);
     615        Value* outputValue = b->CreateSub(b->CreateSub(phiEndBits, actualStartBits), phiCarryBit);
     616        Value* newCarryBit = b->CreateZExt(b->CreateICmpUGT(b->CreateAdd(actualStartBits, phiCarryBit), phiEndBits), b->getIntNTy(fw));
     617
     618        this->storeM0(b, phiCurrentIndex, outputValue);
     619
     620        phiCurrentIndex->addIncoming(b->CreateAdd(phiCurrentIndex, SIZE_1), b->GetInsertBlock());
     621        phiStartBits->addIncoming(INT256_0, b->GetInsertBlock());
     622        phiEndBits->addIncoming(INT256_0, b->GetInsertBlock());
     623        phiCarryBit->addIncoming(newCarryBit, b->GetInsertBlock());
     624
     625        b->CreateBr(appendM0Con);
     626
     627        // ---- AppendM0Exit
     628        b->SetInsertPoint(appendM0Exit);
     629        Value* finalStartBits = b->CreateSelect(b->CreateICmpEQ(phiCurrentIndex, startBlockIndex), b->CreateOr(phiStartBits, b->CreateShl(INT256_1, startOffset)), phiStartBits);
     630        Value* finalEndBits = b->CreateOr(phiEndBits, b->CreateShl(INT256_1, endOffset));
     631        b->setScalarField("pendingM0Index", phiCurrentIndex);
     632        b->setScalarField("pendingM0StartBits", finalStartBits);
     633        b->setScalarField("pendingM0EndBits", finalEndBits);
     634        b->setScalarField("pendingM0CarryBit", phiCarryBit);
     635    }
     636
     637    void LZ4IndexBuilderKernel::storeM0(const std::unique_ptr<KernelBuilder> &b, llvm::Value* blockIndex, llvm::Value* value) {
     638        int fw = 64;
     639        Value* m0BufferBlocks = b->getSize(this->getOutputStreamSetBuffer("M0Marker")->getBufferBlocks() * b->getBitBlockWidth() / fw);
     640        Value* indexRem = b->CreateURem(blockIndex, m0BufferBlocks);
     641        Value* outputBasePtr = b->CreatePointerCast(b->getRawOutputPointer("M0Marker", b->getSize(0)), b->getIntNTy(fw)->getPointerTo());
     642        b->CreateStore(value, b->CreateGEP(outputBasePtr, indexRem));
     643    }
     644
     645    void LZ4IndexBuilderKernel::storePendingM0(const std::unique_ptr<KernelBuilder> &b) {
     646        Value* outputValue = b->CreateSub(
     647                b->CreateSub(
     648                        b->getScalarField("pendingM0EndBits"),
     649                        b->getScalarField("pendingM0StartBits")
     650                ),
     651                b->getScalarField("pendingM0CarryBit")
     652        );
     653        this->storeM0(b, b->getScalarField("pendingM0Index"), outputValue);
     654    }
     655
    562656}
  • icGREP/icgrep-devel/icgrep/kernels/lz4/lz4_index_builder.h

    r6020 r6022  
    2020    class LZ4IndexBuilderKernel final : public SegmentOrientedKernel {
    2121    public:
    22         LZ4IndexBuilderKernel(const std::unique_ptr<kernel::KernelBuilder> &iBuilder);
     22        LZ4IndexBuilderKernel(const std::unique_ptr<kernel::KernelBuilder> &b);
    2323
    2424    protected:
     
    4242
    4343        llvm::Value *
    44         processLiteral(const std::unique_ptr<KernelBuilder> &iBuilder, llvm::Value *token, llvm::Value *tokenPos,
     44        processLiteral(const std::unique_ptr<KernelBuilder> &b, llvm::Value *token, llvm::Value *tokenPos,
    4545                       llvm::Value *blockEnd);
    4646
     
    5959
    6060        void markCircularOutputBitstream(const std::unique_ptr<KernelBuilder> &iBuilder, const std::string &bitstreamName, llvm::Value *pos);
     61
     62
     63        void appendM0Output(const std::unique_ptr<KernelBuilder> &iBuilder, llvm::Value *start, llvm::Value *end);
     64        void storeM0(const std::unique_ptr<KernelBuilder> &iBuilder, llvm::Value* blockIndex, llvm::Value* value);
     65        void storePendingM0(const std::unique_ptr<KernelBuilder> &iBuilder);
     66
    6167    };
    6268}
Note: See TracChangeset for help on using the changeset viewer.