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_parallel_bytestream_aio.cpp

    r6065 r6066  
    5454    Value* LZ4ParallelByteStreamAioKernel::generateSimdAcceleration(const std::unique_ptr<KernelBuilder> &b, llvm::Value *beginTokenPosVec,
    5555                                  llvm::Value *blockEndVec) {
     56        /*
    5657        // TODO incomplete
    5758
     
    106107
    107108
    108 
     109*/
    109110        return beginTokenPosVec;    //TODO
     111
    110112    }
    111113
     
    117119
    118120        // Constant
    119         ConstantInt* SIZE_0 = b->getSize(0);
    120         ConstantInt* SIZE_1 = b->getSize(1);
    121         ConstantInt* BYTE_FF = b->getInt8(0xff);
    122121        Value* BIT_BLOCK_0 = ConstantVector::getNullValue(b->getBitBlockType());
    123122        Value* BIT_BLOCK_1 = b->simd_fill(SIMD_WIDTH, b->getIntN(SIMD_WIDTH, 0x1));
     
    126125        Value* BIT_BLOCK_FF = b->simd_fill(SIMD_WIDTH, b->getIntN(SIMD_WIDTH, 0xff));
    127126        Value* BIT_BLOCK_FFFF = b->simd_fill(SIMD_WIDTH, b->getIntN(SIMD_WIDTH, 0xffff));
    128         Type* i4Ty = b->getIntNTy(4);
    129127        Type* INT_BIT_BLOCK_TY = b->getIntNTy(b->getBitBlockWidth());
    130128        Constant* INT_BIT_BLOCK_TY_0 = b->getIntN(b->getBitBlockWidth(), 0);
     
    688686    void LZ4ParallelByteStreamAioKernel::handleSimdMatchCopy(const std::unique_ptr<KernelBuilder> &b, llvm::Value* matchOffsetVec, llvm::Value* matchLengthVec, llvm::Value* outputPosVec) {
    689687        // TODO use memcpy first
    690         Value* l = b->CreateExtractElement(matchLengthVec, (uint64_t)0);
    691         Value* shouldPrint = b->CreateICmpNE(l, b->getSize(0));
     688//        Value* l = b->CreateExtractElement(matchLengthVec, (uint64_t)0);
     689//        Value* shouldPrint = b->CreateICmpNE(l, b->getSize(0));
    692690//        b->CallPrintIntCond("matchOffset", b->CreateExtractElement(matchOffsetVec, (uint64_t)0), shouldPrint);
    693691//        b->CallPrintIntCond("matchLength", l, shouldPrint);
    694         BasicBlock* entryBlock = b->GetInsertBlock();
    695692        Value* outputCapacity = b->getCapacity("outputStream");
    696693        Value* outputBasePtr = b->CreatePointerCast(b->getRawOutputPointer("outputStream", b->getSize(0)), b->getInt8PtrTy());
     
    743740
    744741    void LZ4ParallelByteStreamAioKernel::handleSimdLiteralCopy(const std::unique_ptr<KernelBuilder> &b, llvm::Value* literalStartVec, llvm::Value* literalLengthVec, llvm::Value* outputPosVec) {
    745         Value* l = b->CreateExtractElement(literalLengthVec, (uint64_t)0);
    746 
    747742        Value* outputCapacity = b->getCapacity("outputStream");
    748743        Value* outputPosRemVec = b->simd_and(outputPosVec, b->simd_fill(SIMD_WIDTH, b->simd_not(b->CreateNeg(outputCapacity))));
    749744        // TODO use memcpy first
    750 
    751         BasicBlock* entryBlock = b->GetInsertBlock();
    752 
    753745
    754746        Value* inputBasePtr = b->CreatePointerCast(b->getRawInputPointer("byteStream", b->getSize(0)), b->getInt8PtrTy());
     
    869861    llvm::Value* LZ4ParallelByteStreamAioKernel::simdFetchByteDataByGather(const std::unique_ptr<KernelBuilder> &b, llvm::Value* basePtr, llvm::Value* offsetVec, llvm::Value* mask) {
    870862        Value* BIT_BLOCK_FF = b->simd_fill(SIMD_WIDTH, b->getIntN(SIMD_WIDTH, 0xff));
    871         Function *gatherFunc = Intrinsic::getDeclaration(b->getModule(), Intrinsic::x86_avx2_gather_d_q_256);
     863//        Function *gatherFunc = Intrinsic::getDeclaration(b->getModule(), Intrinsic::x86_avx2_gather_d_q_256);
    872864        Function *gatherFunc2 = Intrinsic::getDeclaration(b->getModule(), Intrinsic::x86_avx2_gather_d_d);
    873865
Note: See TracChangeset for help on using the changeset viewer.