Ignore:
Timestamp:
Apr 6, 2016, 1:03:48 PM (3 years ago)
Author:
nmedfort
Message:

Symbol table work

File:
1 edited

Legend:

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

    r5000 r5001  
    6262    Type * const inputType = PointerType::get(ArrayType::get(StructType::get(mMod->getContext(), std::vector<Type *>({ArrayType::get(mBitBlockType, 8)})), 1), 0);
    6363
    64     Function * const main = cast<Function>(mMod->getOrInsertFunction("Main", Type::getVoidTy(mMod->getContext()), inputType, int64ty, int8PtrTy, int64ty, nullptr));
     64    Function * const main = cast<Function>(mMod->getOrInsertFunction("Main", Type::getVoidTy(mMod->getContext()), inputType, int64ty, int8PtrTy, iBuilder->getInt1Ty(), nullptr));
    6565    main->setCallingConv(CallingConv::C);
    6666    Function::arg_iterator args = main->arg_begin();
     
    7676
    7777    iBuilder->SetInsertPoint(BasicBlock::Create(mMod->getContext(), "entry", main,0));
     78
    7879
    7980    BasicBlock * entryBlock = iBuilder->GetInsertBlock();
     
    9899    Instance * scanMatchInstance = mScanMatchKernel->instantiate(icGrepInstance->getResultSet());
    99100
    100     Value * ptr = iBuilder->CreateBitCast(inputStream, int8PtrTy);
    101 
    102     scanMatchInstance->setInternalState("FileBuf", ptr);
     101    scanMatchInstance->setInternalState("FileBuf", iBuilder->CreateBitCast(inputStream, int8PtrTy));
    103102    scanMatchInstance->setInternalState("FileSize", bufferSize);
    104103    scanMatchInstance->setInternalState("FileName", fileName);
     
    167166
    168167    iBuilder->SetInsertPoint(endBlock);
    169     Value * isFinalLineUnterminated = iBuilder->CreateICmpEQ(finalLineUnterminated, ConstantInt::get(int64ty, 0));
     168    Value * isFinalLineUnterminated = iBuilder->CreateICmpEQ(finalLineUnterminated, ConstantInt::getNullValue(finalLineUnterminated->getType()));
    170169    iBuilder->CreateCondBr(isFinalLineUnterminated, exitBlock, unterminatedBlock);
    171170   
Note: See TracChangeset for help on using the changeset viewer.