Ignore:
Timestamp:
May 10, 2017, 4:26:11 PM (2 years ago)
Author:
nmedfort
Message:

Large refactoring step. Removed IR generation code from Kernel (formally KernelBuilder?) and moved it into the new KernelBuilder? class.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/symbol_generator.cpp

    r5435 r5440  
    1212namespace pablo {
    1313
    14 String * SymbolGenerator::makeString(llvm::LLVMContext & C, const llvm::StringRef prefix) noexcept {
     14String * SymbolGenerator::makeString(const llvm::StringRef prefix) noexcept {
    1515    auto f = mPrefixMap.find(prefix);
    1616    if (f == mPrefixMap.end()) {   
     
    2020        llvm::StringRef name(data, prefix.size());
    2121        mPrefixMap.insert(std::make_pair(name, 1));
    22         return new (mAllocator) String(llvm::IntegerType::getInt8PtrTy(C), name, mAllocator);
     22        return new (mAllocator) String(llvm::IntegerType::getInt8PtrTy(mContext), name, mAllocator);
    2323    } else { // this string already exists; make a new string using the given prefix
    2424
     
    4040        }
    4141        *p = '_';
    42         return makeString(C, llvm::StringRef(name, length));
     42        return makeString(llvm::StringRef(name, length));
    4343    }
    4444}
    4545
    46 Integer * SymbolGenerator::getInteger(llvm::LLVMContext & C, const IntTy value) noexcept {
     46Integer * SymbolGenerator::getInteger(const IntTy value) noexcept {
    4747    auto f = mIntegerMap.find(value);
    4848    Integer * result;
    4949    if (f == mIntegerMap.end()) {       
    50         result = new (mAllocator) Integer(value, llvm::IntegerType::getInt64Ty(C), mAllocator);
     50        result = new (mAllocator) Integer(value, llvm::IntegerType::getInt64Ty(mContext), mAllocator);
    5151        assert (result->value() == value);
    5252        mIntegerMap.emplace(value, result);
Note: See TracChangeset for help on using the changeset viewer.