Ignore:
Timestamp:
Jun 7, 2018, 11:59:41 AM (11 months ago)
Author:
xwa163
Message:

fix some warning in lz4 related kernels

File:
1 edited

Legend:

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

    r6059 r6066  
    132132    LZ4SwizzledAioKernel::generateProcessCompressedBlock(const std::unique_ptr<KernelBuilder> &b, llvm::Value *lz4BlockStart,
    133133                                                           llvm::Value *lz4BlockEnd) {
    134         BasicBlock* entryBlock = b->GetInsertBlock();
    135 
    136134        Value* isTerminal = b->CreateICmpEQ(lz4BlockEnd, b->getScalarField("fileSize"));
    137135        b->setTerminationSignal(isTerminal);
     
    190188
    191189        Type* INT_ACCELERATION_TYPE = b->getIntNTy(ACCELERATION_WIDTH);
    192         Type* BITBLOCK_PTR_TYPE = b->getBitBlockType()->getPointerTo();
    193190
    194191        Value* INT_ACCELERATION_0 = b->getIntN(ACCELERATION_WIDTH, 0);
     
    802799        Value* SIZE_1 = b->getSize(1);
    803800
    804 
    805         Value* inputStreamSize = b->getCapacity("sourceStreamSet0");
     801//        Value* inputStreamSize = b->getCapacity("sourceStreamSet0");
    806802        Value* outputStreamSize = b->getCapacity("outputStreamSet0");
    807803
     
    809805
    810806
    811         BasicBlock* entryBlock = b->GetInsertBlock();
    812807        Value* outputPos = b->getScalarField("outputPos");
    813808
     
    817812
    818813        vector<Value*> outputStreamBasePtrs; // <4 * i64>*
    819         for (int i = 0; i < mStreamSize; i++) {
     814        for (unsigned i = 0; i < mStreamSize; i++) {
    820815            outputStreamBasePtrs.push_back(b->CreatePointerCast(b->getRawOutputPointer("outputStreamSet" + std::to_string(i), SIZE_0), BITBLOCK_PTR_TYPE));
    821816        }
     
    832827
    833828        Value* literalRem = b->CreateURem(literalStart, SIZE_64);
    834         Value* literalBlockIndex = b->CreateUDiv(b->CreateURem(literalStart, inputStreamSize), SIZE_64);
    835829
    836830        Value* outputPosRem = b->CreateURem(outputPos, SIZE_64);
     
    856850
    857851
    858         for (int i = 0; i < mStreamSize; i++) {
     852        for (unsigned i = 0; i < mStreamSize; i++) {
    859853            Value* inputValue = inputLiteralValues[i];
    860854
     
    907901
    908902        vector<Value*> sourceStreamBasePtrs, outputStreamBasePtrs; // <4 * i64>*
    909         for (int i = 0; i < mStreamSize; i++) {
     903        for (unsigned i = 0; i < mStreamSize; i++) {
    910904            sourceStreamBasePtrs.push_back(b->CreatePointerCast(b->getRawInputPointer("sourceStreamSet" + std::to_string(i), SIZE_0), BITBLOCK_PTR_TYPE, "aa" + std::to_string(i)));
    911905            outputStreamBasePtrs.push_back(b->CreatePointerCast(b->getRawOutputPointer("outputStreamSet" + std::to_string(i), SIZE_0), BITBLOCK_PTR_TYPE));
     
    943937        Value* clearMask = b->simd_fill(64, b->CreateSub(b->CreateShl(SIZE_1, outputPosRem), SIZE_1));
    944938
    945         for (int i = 0; i < mStreamSize; i++) {
     939        for (unsigned i = 0; i < mStreamSize; i++) {
    946940            Value* inputValue = b->CreateLoad(b->CreateGEP(sourceStreamBasePtrs[i], literalBlockIndex));
    947941            Value* outputValue = b->CreateLoad(b->CreateGEP(outputStreamBasePtrs[i], outputBlockIndex));
     
    973967
    974968        vector<Value*> outputStreamBasePtrs; // <4 * i64>*
    975         for (int i = 0; i < mStreamSize; i++) {
     969        for (unsigned i = 0; i < mStreamSize; i++) {
    976970            outputStreamBasePtrs.push_back(b->CreatePointerCast(b->getRawOutputPointer("outputStreamSet" + std::to_string(i), SIZE_0), BITBLOCK_PTR_TYPE));
    977971        }
     
    10091003        copySize = b->CreateUMin(copySize, phiMatchLength);
    10101004
    1011         for (int i = 0; i < mStreamSize; i++) {
     1005        for (unsigned i = 0; i < mStreamSize; i++) {
    10121006            Value* inputValue = b->CreateLoad(b->CreateGEP(outputStreamBasePtrs[i], outputFromPosBlockIndex));
    10131007            Value* outputValue = b->CreateLoad(b->CreateGEP(outputStreamBasePtrs[i], outputToPosBlockIndex));
Note: See TracChangeset for help on using the changeset viewer.