Ignore:
Timestamp:
Nov 11, 2017, 9:46:13 PM (19 months ago)
Author:
cameron
Message:

Changes for compatibility with LLVM 5.0.0

Location:
icGREP/icgrep-devel/icgrep/kernels
Files:
3 edited

Legend:

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

    r5706 r5733  
    3131    PointerType * const selfType = mKernelStateType->getPointerTo();
    3232    IntegerType * const sizeTy = idb->getSizeTy();
    33     PointerType * const consumerTy = StructType::get(sizeTy, sizeTy->getPointerTo()->getPointerTo(), nullptr)->getPointerTo();
     33    PointerType * const consumerTy = StructType::get(idb->getContext(), {sizeTy, sizeTy->getPointerTo()->getPointerTo()})->getPointerTo();
    3434    Type * const voidTy = idb->getVoidTy();
    3535
     
    6464    doSegment->setCallingConv(CallingConv::C);
    6565    doSegment->setDoesNotThrow();
    66     doSegment->setDoesNotCapture(1); // for self parameter only.
    6766    args = doSegment->arg_begin();
    6867    args->setName("self");
     
    9897    terminateFunc->setCallingConv(CallingConv::C);
    9998    terminateFunc->setDoesNotThrow();
    100     terminateFunc->setDoesNotCapture(1);
    10199    args = terminateFunc->arg_begin();
    102100    args->setName("self");
  • icGREP/icgrep-devel/icgrep/kernels/kernel.cpp

    r5732 r5733  
    297297        addScalar(binding.getType(), binding.getName());
    298298    }
    299     Type * const consumerSetTy = StructType::get(sizeTy, sizeTy->getPointerTo()->getPointerTo(), nullptr)->getPointerTo();
     299    Type * const consumerSetTy = StructType::get(idb->getContext(), {sizeTy, sizeTy->getPointerTo()->getPointerTo()})->getPointerTo();
    300300    for (unsigned i = 0; i < mStreamSetOutputs.size(); i++) {
    301301        addScalar(consumerSetTy, mStreamSetOutputs[i].getName() + CONSUMER_SUFFIX);
     
    527527    PointerType * const sizePtrTy = sizeTy->getPointerTo();
    528528    PointerType * const sizePtrPtrTy = sizePtrTy->getPointerTo();
    529     StructType * const consumerTy = StructType::get(sizeTy, sizePtrPtrTy, nullptr);
     529    StructType * const consumerTy = StructType::get(idb->getContext(), {sizeTy, sizePtrPtrTy});
    530530    for (unsigned i = 0; i < mStreamSetOutputBuffers.size(); ++i) {
    531531        const auto output = mStreamSetOutputBuffers[i];
     
    13311331        mCurrentMethod->setCallingConv(CallingConv::C);
    13321332        mCurrentMethod->setDoesNotThrow();
    1333         mCurrentMethod->setDoesNotCapture(1);
    13341333        auto args = mCurrentMethod->arg_begin();
    13351334        args->setName("self");
     
    13791378        mCurrentMethod->setCallingConv(CallingConv::C);
    13801379        mCurrentMethod->setDoesNotThrow();
    1381         mCurrentMethod->setDoesNotCapture(1);
    13821380        auto args = mCurrentMethod->arg_begin();
    13831381        args->setName("self");
  • icGREP/icgrep-devel/icgrep/kernels/streamset.cpp

    r5721 r5733  
    812812
    813813SourceBuffer::SourceBuffer(const std::unique_ptr<kernel::KernelBuilder> & b, Type * type, unsigned MemoryAddressSpace, unsigned StructAddressSpace)
    814 : StreamSetBuffer(BufferKind::SourceBuffer, type, StructType::get(resolveStreamSetType(b, type)->getPointerTo(MemoryAddressSpace), b->getSizeTy(), b->getSizeTy(), nullptr), 0, StructAddressSpace) {
     814: StreamSetBuffer(BufferKind::SourceBuffer, type, StructType::get(b->getContext(), {resolveStreamSetType(b, type)->getPointerTo(MemoryAddressSpace), b->getSizeTy(), b->getSizeTy()}), 0, StructAddressSpace) {
    815815    mUniqueID = "B";
    816816    if (MemoryAddressSpace != 0 || StructAddressSpace != 0) {
     
    872872    IntegerType * sizeTy = b->getSizeTy();
    873873    PointerType * typePtr = baseType->getPointerTo(addrSpace);
    874     return StructType::get(typePtr, typePtr, sizeTy, sizeTy, sizeTy, sizeTy, sizeTy, nullptr);
     874    return StructType::get(b->getContext(), {typePtr, typePtr, sizeTy, sizeTy, sizeTy, sizeTy, sizeTy});
    875875}
    876876
     
    947947                type = ArrayType::get(type, fieldWidth);
    948948            }
    949             return StructType::get(b->getSizeTy(), type->getPointerTo(), nullptr);
     949            return StructType::get(b->getContext(), {b->getSizeTy(), type->getPointerTo()});
    950950        }
    951951    }
Note: See TracChangeset for help on using the changeset viewer.