Changeset 5139 for icGREP/icgrep-devel


Ignore:
Timestamp:
Aug 30, 2016, 8:51:42 AM (3 years ago)
Author:
lindanl
Message:

change getInt64Ty to getSizeTy.

Location:
icGREP/icgrep-devel/icgrep
Files:
4 edited

Legend:

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

    r5137 r5139  
    133133    mIsNameExpression = isNameExpression;
    134134
    135     Type * const int64ty = iBuilder->getInt64Ty();
    136135    Type * const int32ty = iBuilder->getInt32Ty();
    137136    Type * const size_ty = iBuilder->getSizeTy();
     
    171170    Value * s2pInstance = s2pk.createInstance({});
    172171 
    173     Type * pthreadTy = int64ty; //Pthread Type for 64-bit machine.
     172    Type * pthreadTy = size_ty;
    174173    FunctionType * funVoidPtrVoidTy = FunctionType::get(voidTy, int8PtrTy, false);   
    175174   
  • icGREP/icgrep-devel/icgrep/kernels/pipeline.cpp

    r5137 r5139  
    2222    Module * m = iBuilder->getModule();
    2323
    24     Type * pthreadTy = iBuilder->getInt64Ty(); //Pthread Type for 64-bit machine.     
     24    Type * pthreadTy = iBuilder->getSizeTy(); //Pthread Type for 64-bit machine.     
    2525    Type * const voidPtrTy = TypeBuilder<void *, false>::get(m->getContext());
    2626    Type * const int8PtrTy = iBuilder->getInt8PtrTy();
  • icGREP/icgrep-devel/icgrep/kernels/streamset.cpp

    r5135 r5139  
    6262
    6363llvm::Value * SingleBlockBuffer::allocateBuffer() {
    64     Type * const int64ty = iBuilder->getInt64Ty();
     64    Type * const size_ty = iBuilder->getSizeTy();
    6565    Type * const int8ty = iBuilder->getInt8Ty();
    6666    mStreamSetStructPtr = iBuilder->CreateAlloca(mStreamSetStructType);
    67     iBuilder->CreateStore(ConstantInt::get(int64ty, 0), iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iProducer_pos)}));
    68     iBuilder->CreateStore(ConstantInt::get(int64ty, 0), iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iConsumer_pos)}));
     67    iBuilder->CreateStore(ConstantInt::get(size_ty, 0), iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iProducer_pos)}));
     68    iBuilder->CreateStore(ConstantInt::get(size_ty, 0), iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iConsumer_pos)}));
    6969    iBuilder->CreateStore(ConstantInt::get(int8ty, 0), iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iEnd_of_input)}));
    7070    mStreamSetBufferPtr = iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iBuffer_ptr)});
     
    8686void ExternalUnboundedBuffer::setStreamSetBuffer(llvm::Value * ptr) {
    8787
    88     Type * const int64ty = iBuilder->getInt64Ty();
     88    Type * const size_ty = iBuilder->getSizeTy();
    8989    Type * const int8ty = iBuilder->getInt8Ty();
    9090
     
    9393
    9494    mStreamSetStructPtr = iBuilder->CreateAlloca(mStreamSetStructType);
    95     iBuilder->CreateStore(ConstantInt::get(int64ty, 0), iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iProducer_pos)}));
    96     iBuilder->CreateStore(ConstantInt::get(int64ty, 0), iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iConsumer_pos)}));
     95    iBuilder->CreateStore(ConstantInt::get(size_ty, 0), iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iProducer_pos)}));
     96    iBuilder->CreateStore(ConstantInt::get(size_ty, 0), iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iConsumer_pos)}));
    9797    iBuilder->CreateStore(ConstantInt::get(int8ty, 1), iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iEnd_of_input)}));
    9898    iBuilder->CreateStore(mStreamSetBufferPtr, iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iBuffer_ptr)}));
     
    121121
    122122llvm::Value * CircularBuffer::allocateBuffer() {
    123     Type * const int64ty = iBuilder->getInt64Ty();
     123    Type * const size_ty = iBuilder->getSizeTy();
    124124    Type * const int8ty = iBuilder->getInt8Ty();
    125125    mStreamSetBufferPtr = iBuilder->CreateAlloca(mStreamSetType.getStreamSetBlockType(iBuilder), ConstantInt::get(iBuilder->getSizeTy(), mBufferBlocks));
    126126    mStreamSetStructPtr = iBuilder->CreateAlloca(mStreamSetStructType);
    127     iBuilder->CreateStore(ConstantInt::get(int64ty, 0), iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iProducer_pos)}));
    128     iBuilder->CreateStore(ConstantInt::get(int64ty, 0), iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iConsumer_pos)}));
     127    iBuilder->CreateStore(ConstantInt::get(size_ty, 0), iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iProducer_pos)}));
     128    iBuilder->CreateStore(ConstantInt::get(size_ty, 0), iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iConsumer_pos)}));
    129129    iBuilder->CreateStore(ConstantInt::get(int8ty, 0), iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iEnd_of_input)}));
    130130    iBuilder->CreateStore(mStreamSetBufferPtr, iBuilder->CreateGEP(mStreamSetStructPtr, {iBuilder->getInt32(0), iBuilder->getInt32(iBuffer_ptr)}));
  • icGREP/icgrep-devel/icgrep/kernels/streamset.h

    r5135 r5139  
    8686    StreamSetBuffer(BufferKind::BlockBuffer, b, ss_type) {
    8787        mStreamSetStructType = StructType::get(getGlobalContext(),
    88                                                std::vector<Type *>({iBuilder->getInt64Ty(),
    89                                                                     iBuilder->getInt64Ty(),
     88                                               std::vector<Type *>({iBuilder->getSizeTy(),
     89                                                                    iBuilder->getSizeTy(),
    9090                                                                    iBuilder->getInt8Ty(),
    9191                                                                    mStreamSetType.getStreamSetBlockType(iBuilder)}));
     
    107107            mAddrSpace = AddressSpace;
    108108            mStreamSetStructType = StructType::get(getGlobalContext(),
    109                                                    std::vector<Type *>({iBuilder->getInt64Ty(),
    110                                                                         iBuilder->getInt64Ty(),
     109                                                   std::vector<Type *>({iBuilder->getSizeTy(),
     110                                                                        iBuilder->getSizeTy(),
    111111                                                                        iBuilder->getInt8Ty(),
    112112                                                                        getStreamBufferPointerType()}));
     
    136136            }
    137137            mStreamSetStructType = StructType::get(getGlobalContext(),
    138                                                    std::vector<Type *>({iBuilder->getInt64Ty(),
    139                                                                         iBuilder->getInt64Ty(),
     138                                                   std::vector<Type *>({iBuilder->getSizeTy(),
     139                                                                        iBuilder->getSizeTy(),
    140140                                                                        iBuilder->getInt8Ty(),
    141141                                                                        getStreamBufferPointerType()}));
Note: See TracChangeset for help on using the changeset viewer.