Ignore:
Timestamp:
May 16, 2017, 4:13:53 PM (2 years ago)
Author:
nmedfort
Message:

Bug fix check in for DumpTrace?, compilation of DoBlock? / DoFinalBlock? functions. Pablo CodeMotionPass? optimized and enabled by default.

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

Legend:

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

    r5446 r5454  
    2929}
    3030
    31 ICgrepKernelBuilder::ICgrepKernelBuilder (const std::unique_ptr<kernel::KernelBuilder> & iBuilder, RE * const re)
    32 : PabloKernel(iBuilder, "",
    33               {Binding{iBuilder->getStreamSetTy(8), "basis"}, Binding{iBuilder->getStreamSetTy(1, 1), "linebreak"}},
    34               {Binding{iBuilder->getStreamSetTy(1, 1), "matches"}},
    35               {},
    36               {})
    37 , mRE(re)
    38 , mSignature(Printer_RE::PrintRE(re)) {
    39     setName("ic" + sha1sum(mSignature));
     31RegularExpressionOptimizer::RegularExpressionOptimizer(re::RE * const re_ast)
     32: mRE(regular_expression_passes(re_ast))
     33, mSignature(Printer_RE::PrintRE(mRE)) {
     34
    4035}
    4136
    42 std::string ICgrepKernelBuilder::makeSignature(const std::unique_ptr<kernel::KernelBuilder> &) {
     37ICGrepKernel::ICGrepKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, RE * const re)
     38: RegularExpressionOptimizer(re)
     39, PabloKernel(iBuilder,
     40              "ic" + sha1sum(mSignature),
     41              {Binding{iBuilder->getStreamSetTy(8), "basis"}, Binding{iBuilder->getStreamSetTy(1, 1), "linebreak"}},
     42              {Binding{iBuilder->getStreamSetTy(1, 1), "matches"}}) {
     43
     44}
     45
     46std::string ICGrepKernel::makeSignature(const std::unique_ptr<kernel::KernelBuilder> &) {
    4347    return mSignature;
    4448}
    4549
    46 void ICgrepKernelBuilder::generatePabloMethod() {
    47     re2pablo_compiler(this, regular_expression_passes(mRE));
     50void ICGrepKernel::generatePabloMethod() {
     51    re2pablo_compiler(this, mRE);
    4852}
    4953
  • icGREP/icgrep-devel/icgrep/kernels/grep_kernel.h

    r5440 r5454  
    1212namespace kernel {
    1313
    14 class ICgrepKernelBuilder: public pablo::PabloKernel {
     14struct RegularExpressionOptimizer {
     15    RegularExpressionOptimizer(re::RE * re_ast);
     16protected:
     17    re::RE * const  mRE;
     18    std::string     mSignature;
     19};
     20
     21class ICGrepKernel : public RegularExpressionOptimizer, public pablo::PabloKernel {
    1522public:
    16     ICgrepKernelBuilder(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, re::RE * const re_ast);   
     23    ICGrepKernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, re::RE * const re_ast);
    1724    std::string makeSignature(const std::unique_ptr<kernel::KernelBuilder> & iBuilder) override;
    1825    bool isCachable() const override { return true; }
    1926protected:
    2027    void generatePabloMethod() override;
    21 private:
    22     re::RE * const  mRE;
    23     std::string     mSignature;
    2428};
    2529
  • icGREP/icgrep-devel/icgrep/kernels/interface.h

    r5440 r5454  
    8686     */
    8787   
    88     const std::string & getName() const { return mKernelName; }
    89 
    90     void setName(std::string newName) { mKernelName = newName; }
     88    const std::string & getName() const {
     89        return mKernelName;
     90    }
    9191       
    9292    virtual bool isCachable() const = 0;
     
    192192    llvm::StructType *                      mKernelStateType;
    193193    unsigned                                mLookAheadPositions;
    194     std::string                             mKernelName;
     194    const std::string                       mKernelName;
    195195    std::vector<llvm::Value *>              mInitialArguments;
    196196    std::vector<Binding>                    mStreamSetInputs;
  • icGREP/icgrep-devel/icgrep/kernels/kernel.cpp

    r5453 r5454  
    140140
    141141    for (unsigned i = 0; i < mStreamSetInputs.size(); i++) {
    142         if ((mStreamSetInputBuffers[i]->getBufferBlocks() > 1) && (mStreamSetInputBuffers[i]->getBufferBlocks() < requiredBlocks)) {
     142        if ((mStreamSetInputBuffers[i]->getBufferBlocks() != 0) && (mStreamSetInputBuffers[i]->getBufferBlocks() < requiredBlocks)) {
    143143            report_fatal_error(getName() + ": " + mStreamSetInputs[i].name + " requires buffer size " + std::to_string(requiredBlocks));
    144144        }
     
    466466    Function * const cp = mCurrentMethod;
    467467    auto ip = idb->saveIP();
     468    std::vector<Value *> availableItemCount(0);
    468469
    469470    /// Check if the do block method is called and create the function if necessary   
    470471    if (!idb->supportsIndirectBr()) {
    471         FunctionType * const type = FunctionType::get(idb->getVoidTy(), {self->getType()}, false);
     472
     473        std::vector<Type *> params;
     474        params.reserve(1 + mAvailableItemCount.size());
     475        params.push_back(self->getType());
     476        for (Value * avail : mAvailableItemCount) {
     477            params.push_back(avail->getType());
     478        }
     479
     480        FunctionType * const type = FunctionType::get(idb->getVoidTy(), params, false);
    472481        mCurrentMethod = Function::Create(type, GlobalValue::InternalLinkage, getName() + DO_BLOCK_SUFFIX, idb->getModule());
    473482        mCurrentMethod->setCallingConv(CallingConv::C);
     
    477486        args->setName("self");
    478487        setInstance(&*args);
    479         idb->SetInsertPoint(idb->CreateBasicBlock("entry"));
     488        availableItemCount.reserve(mAvailableItemCount.size());
     489        while (++args != mCurrentMethod->arg_end()) {
     490            availableItemCount.push_back(&*args);
     491        }
     492        assert (availableItemCount.size() == mAvailableItemCount.size());
     493        mAvailableItemCount.swap(availableItemCount);
     494        idb->SetInsertPoint(BasicBlock::Create(idb->getContext(), "entry", mCurrentMethod));
    480495    }
    481496
     
    527542    }
    528543
    529 
    530     /// Call the do block method if necessary then restore the current function state to the do segement method
    531544    if (!idb->supportsIndirectBr()) {
     545        // Restore the DoSegment function state then call the DoBlock method
    532546        idb->CreateRetVoid();
    533547        mDoBlockMethod = mCurrentMethod;
    534548        idb->restoreIP(ip);
    535         idb->CreateCall(mCurrentMethod, self);
    536549        setInstance(self);
    537550        mCurrentMethod = cp;
     551        mAvailableItemCount.swap(availableItemCount);
     552        CreateDoBlockMethodCall(idb);
    538553    }
    539554
     
    546561    Value * const remainingItemCount = remainingItems;
    547562    auto ip = idb->saveIP();
     563    std::vector<Value *> availableItemCount(0);
    548564
    549565    if (!idb->supportsIndirectBr()) {
    550         FunctionType * const type = FunctionType::get(idb->getVoidTy(), {self->getType(), idb->getSizeTy()}, false);
     566        std::vector<Type *> params;
     567        params.reserve(2 + mAvailableItemCount.size());
     568        params.push_back(self->getType());
     569        params.push_back(idb->getSizeTy());
     570        for (Value * avail : mAvailableItemCount) {
     571            params.push_back(avail->getType());
     572        }
     573        FunctionType * const type = FunctionType::get(idb->getVoidTy(), params, false);
    551574        mCurrentMethod = Function::Create(type, GlobalValue::InternalLinkage, getName() + FINAL_BLOCK_SUFFIX, idb->getModule());
    552575        mCurrentMethod->setCallingConv(CallingConv::C);
     
    558581        remainingItems = &*(++args);
    559582        remainingItems->setName("remainingItems");
    560         idb->SetInsertPoint(idb->CreateBasicBlock("entry"));
     583        availableItemCount.reserve(mAvailableItemCount.size());
     584        while (++args != mCurrentMethod->arg_end()) {
     585            availableItemCount.push_back(&*args);
     586        }
     587        assert (availableItemCount.size() == mAvailableItemCount.size());
     588        mAvailableItemCount.swap(availableItemCount);
     589        idb->SetInsertPoint(BasicBlock::Create(idb->getContext(), "entry", mCurrentMethod));
    561590    }
    562591
     
    568597        idb->CreateRetVoid();
    569598        idb->restoreIP(ip);
    570         idb->CreateCall(mCurrentMethod, {self, remainingItemCount});
     599        setInstance(self);
     600        mAvailableItemCount.swap(availableItemCount);
     601        // Restore the DoSegment function state then call the DoFinal method
     602        std::vector<Value *> args;
     603        args.reserve(2 + mAvailableItemCount.size());
     604        args.push_back(self);
     605        args.push_back(remainingItemCount);
     606        for (Value * avail : mAvailableItemCount) {
     607            args.push_back(avail);
     608        }
     609        idb->CreateCall(mCurrentMethod, args);
    571610        mCurrentMethod = cp;
    572         setInstance(self);
    573611    }
    574612
     
    589627        idb->SetInsertPoint(bb);
    590628    } else {
    591         idb->CreateCall(mDoBlockMethod, getInstance());
     629        std::vector<Value *> args;
     630        args.reserve(1 + mAvailableItemCount.size());
     631        args.push_back(getInstance());
     632        for (Value * avail : mAvailableItemCount) {
     633            args.push_back(avail);
     634        }
     635        idb->CreateCall(mDoBlockMethod, args);
    592636    }
    593637}
     
    602646
    603647    DataLayout DL(kb->getModule());
    604     IntegerType * const intAddressTy = DL.getIntPtrType(kb->getContext());
     648    IntegerType * const intAddrTy = DL.getIntPtrType(kb->getContext());
    605649
    606650    std::vector<Type *> multiBlockParmTypes;
     
    930974        mStreamSetInputBuffers[i]->createBlockAlignedCopy(kb.get(), nextBufPtr, kb->getStreamSetBufferPtr(mStreamSetInputs[i].name), copyItems2);
    931975        Value * itemAddress = kb->getRawInputPointer(mStreamSetInputs[i].name, kb->getInt32(0), processedItemCount[i]);
    932         itemAddress = kb->CreatePtrToInt(itemAddress, intAddressTy);
     976        itemAddress = kb->CreatePtrToInt(itemAddress, intAddrTy);
    933977        Value * baseAddress = inputBlockPtr[i];
    934         baseAddress = kb->CreatePtrToInt(baseAddress, intAddressTy);
    935         Value * tempAddress = kb->CreateAdd(kb->CreatePtrToInt(tempBufPtr, intAddressTy), kb->CreateSub(itemAddress, baseAddress));
     978        baseAddress = kb->CreatePtrToInt(baseAddress, intAddrTy);
     979        Value * tempAddress = kb->CreateAdd(kb->CreatePtrToInt(tempBufPtr, intAddrTy), kb->CreateSub(itemAddress, baseAddress));
    936980        tempArgs.push_back(kb->CreateIntToPtr(tempAddress, mStreamSetInputBuffers[i]->getPointerType()));
    937981    }
     
    944988        blockBasePos.push_back(kb->CreateAnd(producedItemCount[i], blockBaseMask));
    945989        mStreamSetOutputBuffers[i]->createBlockAlignedCopy(kb.get(), tempBufPtr, outputBlockPtr[i], kb->CreateSub(producedItemCount[i], blockBasePos[i]));
    946         Value * itemAddress = kb->CreatePtrToInt(kb->getRawOutputPointer(mStreamSetOutputs[i].name, kb->getInt32(0), producedItemCount[i]), intAddressTy);
     990        Value * itemAddress = kb->CreatePtrToInt(kb->getRawOutputPointer(mStreamSetOutputs[i].name, kb->getInt32(0), producedItemCount[i]), intAddrTy);
    947991        Value * outputPtr = kb->getOutputStreamBlockPtr(mStreamSetOutputs[i].name, kb->getInt32(0));
    948         Value * baseAddress = kb->CreatePtrToInt(outputPtr, intAddressTy);
    949         Value * tempAddress = kb->CreateAdd(kb->CreatePtrToInt(tempBufPtr, intAddressTy), kb->CreateSub(itemAddress, baseAddress));
     992        Value * baseAddress = kb->CreatePtrToInt(outputPtr, intAddrTy);
     993        Value * tempAddress = kb->CreateAdd(kb->CreatePtrToInt(tempBufPtr, intAddrTy), kb->CreateSub(itemAddress, baseAddress));
    950994        tempArgs.push_back(kb->CreateIntToPtr(tempAddress, mStreamSetOutputBuffers[i]->getPointerType()));
    951995    }
     
    9941038}
    9951039
     1040static inline std::string annotateKernelNameWithDebugFlags(std::string && name) {
     1041    if (codegen::EnableAsserts) {
     1042        name += "_EA";
     1043    }
     1044    return name;
     1045}
     1046
    9961047// CONSTRUCTOR
    9971048Kernel::Kernel(std::string && kernelName,
    998                              std::vector<Binding> && stream_inputs,
    999                              std::vector<Binding> && stream_outputs,
    1000                              std::vector<Binding> && scalar_parameters,
    1001                              std::vector<Binding> && scalar_outputs,
    1002                              std::vector<Binding> && internal_scalars)
    1003 : KernelInterface(std::move(kernelName), std::move(stream_inputs), std::move(stream_outputs), std::move(scalar_parameters), std::move(scalar_outputs), std::move(internal_scalars))
     1049               std::vector<Binding> && stream_inputs,
     1050               std::vector<Binding> && stream_outputs,
     1051               std::vector<Binding> && scalar_parameters,
     1052               std::vector<Binding> && scalar_outputs,
     1053               std::vector<Binding> && internal_scalars)
     1054: KernelInterface(std::move(annotateKernelNameWithDebugFlags(std::move(kernelName)))
     1055                  , std::move(stream_inputs), std::move(stream_outputs)
     1056                  , std::move(scalar_parameters), std::move(scalar_outputs)
     1057                  , std::move(internal_scalars))
    10041058, mCurrentMethod(nullptr)
    10051059, mNoTerminateAttribute(false)
     
    10311085// CONSTRUCTOR
    10321086MultiBlockKernel::MultiBlockKernel(std::string && kernelName,
    1033                                      std::vector<Binding> && stream_inputs,
    1034                                      std::vector<Binding> && stream_outputs,
    1035                                      std::vector<Binding> && scalar_parameters,
    1036                                      std::vector<Binding> && scalar_outputs,
    1037                                              std::vector<Binding> && internal_scalars)
     1087                                   std::vector<Binding> && stream_inputs,
     1088                                   std::vector<Binding> && stream_outputs,
     1089                                   std::vector<Binding> && scalar_parameters,
     1090                                   std::vector<Binding> && scalar_outputs,
     1091                                   std::vector<Binding> && internal_scalars)
    10381092: Kernel(std::move(kernelName), std::move(stream_inputs), std::move(stream_outputs), std::move(scalar_parameters), std::move(scalar_outputs), std::move(internal_scalars)) {
    10391093   
  • icGREP/icgrep-devel/icgrep/kernels/kernel.h

    r5446 r5454  
    8888
    8989    llvm::Module * setModule(const std::unique_ptr<KernelBuilder> & idb, llvm::Module * const module);
    90 
    91     void createKernelStub(const std::unique_ptr<KernelBuilder> & idb, const StreamSetBuffers & inputs, const StreamSetBuffers & outputs, llvm::Module * const kernelModule);
    9290
    9391    llvm::Module * getModule() const {
  • icGREP/icgrep-devel/icgrep/kernels/kernel_builder.h

    r5446 r5454  
    115115
    116116    KernelBuilder(llvm::LLVMContext & C, unsigned registerWidth, unsigned blockWidth, unsigned stride)
    117     : IDISA::IDISA_Builder(C, registerWidth, blockWidth, stride) {
     117    : IDISA::IDISA_Builder(C, registerWidth, blockWidth, stride)
     118    , mKernel(nullptr) {
    118119
    119120    }
  • icGREP/icgrep-devel/icgrep/kernels/source_kernel.cpp

    r5440 r5454  
    8181    // instruct the OS that it can safely drop any fully consumed pages
    8282    Value * consumed = iBuilder->getConsumedItemCount("sourceBuffer");
    83     Type * const consumedTy = consumed->getType();
     83    IntegerType * const consumedTy = cast<IntegerType>(consumed->getType());
    8484    Type * const voidPtrTy = iBuilder->getVoidPtrTy();
     85
     86    DataLayout DL(iBuilder->getModule());
     87    IntegerType * const intAddrTy = iBuilder->getIntPtrTy(DL);
    8588
    8689    // multiply the consumed count by the code unit size then mask off any partial pages
    8790    if (mCodeUnitWidth > 8) {
    88         consumed = iBuilder->CreateMul(consumed, iBuilder->getSize(mCodeUnitWidth / 8));
     91        consumed = iBuilder->CreateMul(consumed, ConstantInt::get(consumedTy, mCodeUnitWidth / 8));
    8992    }
    9093    const auto pageSize = getpagesize();
     
    9497        consumed = iBuilder->CreateSub(consumed, iBuilder->CreateURem(consumed, ConstantInt::get(consumedTy, pageSize)));
    9598    }
     99
    96100    Value * sourceBuffer = iBuilder->getBaseAddress("sourceBuffer");
    97     sourceBuffer = iBuilder->CreatePtrToInt(sourceBuffer, consumedTy);
     101    sourceBuffer = iBuilder->CreatePtrToInt(sourceBuffer, intAddrTy);
     102    if (LLVM_UNLIKELY(intAddrTy->getBitWidth() > consumedTy->getBitWidth())) {
     103        consumed = iBuilder->CreateZExt(consumed, intAddrTy);
     104    } else if (LLVM_UNLIKELY(intAddrTy->getBitWidth() < consumedTy->getBitWidth())) {
     105        sourceBuffer = iBuilder->CreateZExt(sourceBuffer, consumedTy);
     106    }
    98107    Value * consumedBuffer = iBuilder->CreateAdd(sourceBuffer, consumed);
    99 
    100 
    101 
    102 
    103108    Value * readableBuffer = iBuilder->getScalarField("readableBuffer");
    104     readableBuffer = iBuilder->CreatePtrToInt(readableBuffer, consumedTy);
     109    readableBuffer = iBuilder->CreatePtrToInt(readableBuffer, consumedBuffer->getType());
    105110    Value * unnecessaryBytes = iBuilder->CreateSub(consumedBuffer, readableBuffer);
    106111
    107 
    108 
    109112    // avoid calling madvise unless an actual page table change could occur
    110     Value * hasPagesToDrop = iBuilder->CreateICmpEQ(unnecessaryBytes, ConstantInt::getNullValue(unnecessaryBytes->getType()));
     113    Value * hasPagesToDrop = iBuilder->CreateICmpEQ(unnecessaryBytes, ConstantInt::getNullValue(intAddrTy));
    111114    iBuilder->CreateLikelyCondBr(hasPagesToDrop, processSegment, dropPages);
    112115
  • icGREP/icgrep-devel/icgrep/kernels/streamset.cpp

    r5452 r5454  
    263263
    264264void SwizzledCopybackBuffer::createBlockAlignedCopy(IDISA::IDISA_Builder * const iBuilder, Value * targetBlockPtr, Value * sourceBlockPtr, Value * itemsToCopy) const {
    265     Type * size_ty = iBuilder->getSizeTy();
    266     Type * i8ptr = iBuilder->getInt8PtrTy();
     265    Type * int8PtrTy = iBuilder->getInt8PtrTy();
     266    DataLayout DL(iBuilder->getModule());
     267    IntegerType * const intAddrTy = iBuilder->getIntPtrTy(DL);
     268
    267269    Constant * blockSize = iBuilder->getSize(iBuilder->getBitBlockWidth());
    268270    Function * f = iBuilder->GetInsertBlock()->getParent();
     
    270272    BasicBlock * partialBlockCopy = BasicBlock::Create(iBuilder->getContext(), "partialBlockCopy", f, 0);
    271273    BasicBlock * copyDone = BasicBlock::Create(iBuilder->getContext(), "copyDone", f, 0);
    272     unsigned numStreams = getType()->getArrayNumElements();
    273     unsigned swizzleFactor = iBuilder->getBitBlockWidth()/mFieldWidth;
    274     auto elemTy = getType()->getArrayElementType();
    275     unsigned fieldWidth = isa<ArrayType>(elemTy) ? elemTy->getArrayNumElements() : 1;
     274    const unsigned numStreams = getType()->getArrayNumElements();
     275    const unsigned swizzleFactor = iBuilder->getBitBlockWidth()/mFieldWidth;
     276    const auto elemTy = getType()->getArrayElementType();
     277    const unsigned fieldWidth = isa<ArrayType>(elemTy) ? elemTy->getArrayNumElements() : 1;
    276278    Value * blocksToCopy = iBuilder->CreateUDiv(itemsToCopy, blockSize);
    277279    Value * partialItems = iBuilder->CreateURem(itemsToCopy, blockSize);
     
    279281    Value * partialBlockSourcePtr = iBuilder->CreateGEP(sourceBlockPtr, blocksToCopy);
    280282    iBuilder->CreateCondBr(iBuilder->CreateICmpUGT(blocksToCopy, iBuilder->getSize(0)), wholeBlockCopy, partialBlockCopy);
     283
    281284    iBuilder->SetInsertPoint(wholeBlockCopy);
    282     unsigned alignment = iBuilder->getBitBlockWidth() / 8;
    283     Value * copyLength = iBuilder->CreateSub(iBuilder->CreatePtrToInt(partialBlockTargetPtr, size_ty), iBuilder->CreatePtrToInt(targetBlockPtr, size_ty));
    284     iBuilder->CreateMemMove(iBuilder->CreateBitCast(targetBlockPtr, i8ptr), iBuilder->CreateBitCast(sourceBlockPtr, i8ptr), copyLength, alignment);
     285    const unsigned alignment = iBuilder->getBitBlockWidth() / 8;
     286    Value * copyLength = iBuilder->CreateSub(iBuilder->CreatePtrToInt(partialBlockTargetPtr, intAddrTy), iBuilder->CreatePtrToInt(targetBlockPtr, intAddrTy));
     287    iBuilder->CreateMemMove(iBuilder->CreatePointerCast(targetBlockPtr, int8PtrTy), iBuilder->CreatePointerCast(sourceBlockPtr, int8PtrTy), copyLength, alignment);
    285288    iBuilder->CreateCondBr(iBuilder->CreateICmpUGT(partialItems, iBuilder->getSize(0)), partialBlockCopy, copyDone);
    286289    iBuilder->SetInsertPoint(partialBlockCopy);
     
    290293        Value * strmTargetPtr = iBuilder->CreateGEP(partialBlockTargetPtr, {iBuilder->getInt32(0), iBuilder->getInt32(strm)});
    291294        Value * strmSourcePtr = iBuilder->CreateGEP(partialBlockSourcePtr, {iBuilder->getInt32(0), iBuilder->getInt32(strm)});
    292         iBuilder->CreateMemMove(iBuilder->CreateBitCast(strmTargetPtr, i8ptr), iBuilder->CreateBitCast(strmSourcePtr, i8ptr), copyBytes, alignment);
     295        iBuilder->CreateMemMove(iBuilder->CreatePointerCast(strmTargetPtr, int8PtrTy), iBuilder->CreatePointerCast(strmSourcePtr, int8PtrTy), copyBytes, alignment);
    293296    }
    294297    iBuilder->CreateBr(copyDone);
     298
    295299    iBuilder->SetInsertPoint(copyDone);
    296300}
     
    475479
    476480SourceBuffer::SourceBuffer(const std::unique_ptr<kernel::KernelBuilder> & b, Type * type, unsigned MemoryAddressSpace, unsigned StructAddressSpace)
    477 : StreamSetBuffer(BufferKind::SourceBuffer, type, StructType::get(resolveStreamSetType(b, type)->getPointerTo(MemoryAddressSpace), b->getSizeTy(), nullptr), 1, StructAddressSpace) {
     481: StreamSetBuffer(BufferKind::SourceBuffer, type, StructType::get(resolveStreamSetType(b, type)->getPointerTo(MemoryAddressSpace), b->getSizeTy(), nullptr), 0, StructAddressSpace) {
    478482    mUniqueID = "B";
    479483    if (MemoryAddressSpace != 0 || StructAddressSpace != 0) {
     
    483487
    484488ExternalBuffer::ExternalBuffer(const std::unique_ptr<kernel::KernelBuilder> & b, Type * type, llvm::Value * addr, unsigned AddressSpace)
    485 : StreamSetBuffer(BufferKind::ExternalBuffer, type, resolveStreamSetType(b, type), 1, AddressSpace) {
     489: StreamSetBuffer(BufferKind::ExternalBuffer, type, resolveStreamSetType(b, type), 0, AddressSpace) {
    486490    mUniqueID = "E";
    487491    if (AddressSpace > 0) mUniqueID += "@" + std::to_string(AddressSpace);
Note: See TracChangeset for help on using the changeset viewer.