Ignore:
Timestamp:
Nov 7, 2016, 9:49:17 AM (3 years ago)
Author:
nmedfort
Message:

Fix for 32-bit architectures.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/grep_engine.cpp

    r5202 r5203  
    272272
    273273    Type * const int32ty = iBuilder->getInt32Ty();
    274     Type * const size_ty = iBuilder->getSizeTy();
     274    Type * const int64ty = iBuilder->getInt64Ty();
    275275    Type * const int8PtrTy = iBuilder->getInt8PtrTy();
    276276    Type * const voidTy = Type::getVoidTy(M->getContext());   
    277277    Type * const voidPtrTy = TypeBuilder<void *, false>::get(M->getContext());
    278278    Type * const inputType = PointerType::get(ArrayType::get(ArrayType::get(iBuilder->getBitBlockType(), (UTF_16 ? 16 : 8)), 1), addrSpace);
    279     Type * const resultTy = CountOnly ? size_ty : iBuilder->getVoidTy();
     279    Type * const resultTy = CountOnly ? int64ty : iBuilder->getVoidTy();
    280280
    281281    Function * mainFn = nullptr;
     
    314314#endif
    315315    if (CPU_Only){
    316         mainFn = cast<Function>(M->getOrInsertFunction("Main", resultTy, inputType, size_ty, size_ty, nullptr));   
     316        mainFn = cast<Function>(M->getOrInsertFunction("Main", resultTy, inputType, int64ty, int64ty, nullptr));
    317317        mainFn->setCallingConv(CallingConv::C);
    318318        iBuilder->SetInsertPoint(BasicBlock::Create(M->getContext(), "entry", mainFn, 0));
     
    342342    Value * s2pInstance = s2pk.createInstance({});
    343343 
    344     Type * pthreadTy = size_ty;
     344    Type * pthreadTy = int64ty;
    345345    FunctionType * funVoidPtrVoidTy = FunctionType::get(voidTy, int8PtrTy, false);   
    346346   
Note: See TracChangeset for help on using the changeset viewer.