Ignore:
Timestamp:
Oct 15, 2014, 12:15:44 PM (5 years ago)
Author:
nmedfort
Message:

Minor changes in preperation for adding multiplexing.

File:
1 edited

Legend:

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

    r4240 r4242  
    7272namespace pablo {
    7373
    74 PabloCompiler::PabloCompiler(std::map<std::string, std::string> name_map, std::string basis_pattern, int bits)
     74PabloCompiler::PabloCompiler(std::map<std::string, std::string> name_map, const BasisBitVars & basisBitVars, int bits)
    7575: mBits(bits)
    7676, m_name_map(name_map)
    77 , mBasisBitPattern(basis_pattern)
     77, mBasisBitVars(basisBitVars)
    7878, mMod(new Module("icgrep", getGlobalContext()))
    7979, mBasicBlock(nullptr)
     
    9797    InitializeNativeTarget();
    9898    std::string ErrStr;
    99 
    10099    mExecutionEngine = EngineBuilder(mMod).setUseMCJIT(true).setErrorStr(&ErrStr).setOptLevel(CodeGenOpt::Level::Less).create();
    101100    if (mExecutionEngine == nullptr) {
    102         throw std::runtime_error("\nCould not create ExecutionEngine: " + ErrStr);
     101        throw std::runtime_error("Could not create ExecutionEngine: " + ErrStr);
    103102    }
    104103
     
    170169        Value* basisBit = b.CreateLoad(mBasisBitsAddr);
    171170        Value* indices[] = {b.getInt64(0), b.getInt32(i)};
    172         const std::string name = mBasisBitPattern + std::to_string(i);
     171        const std::string name = mBasisBitVars[i]->getName();
    173172        Value* basis_bits_struct_GEP = b.CreateGEP(basisBit, indices, name);
    174173        mMarkerMap.insert(make_pair(name, basis_bits_struct_GEP));
Note: See TracChangeset for help on using the changeset viewer.