Ignore:
Timestamp:
Sep 14, 2016, 2:56:54 PM (3 years ago)
Author:
nmedfort
Message:

Work on multiplexing and distribution passes + a few AST modification bug fixes.

File:
1 edited

Legend:

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

    r5141 r5156  
    2121#include <llvm/Support/Debug.h>
    2222
    23 
    2423namespace pablo {
    2524
     
    4948   
    5049void PabloCompiler::compile(Function * doBlockFunction) {
     50
    5151    // Make sure that we generate code into the right module.
    5252    mMod = iBuilder->getModule();
     
    7070        outputSet_ptr = mKernelBuilder->getStreamSetBlockPtr(mSelf, outputName, blockNo);
    7171    }
     72
     73    mMarkerMap.emplace(PabloBlock::createZeroes(), iBuilder->allZeroes());
     74    mMarkerMap.emplace(PabloBlock::createOnes(), iBuilder->allOnes());
    7275    for (unsigned j = 0; j < mPabloFunction->getNumOfParameters(); ++j) {
    7376        Value * inputVal = iBuilder->CreateGEP(inputSet_ptr, {iBuilder->getInt32(0), iBuilder->getInt32(j)});
     
    8992    }
    9093    iBuilder->CreateRetVoid();
    91 
    9294   
    9395    #ifdef PRINT_TIMING_INFORMATION
     
    9597    std::cerr << "PABLO COMPILATION TIME: " << (pablo_compilation_end - pablo_compilation_start) << std::endl;
    9698    #endif
    97 
    9899}
    99100
     
    225226    for (const Next * n : nextNodes) {
    226227        PHINode * phi = iBuilder->CreatePHI(mBitBlockType, 2, n->getName()->value());
    227         auto f = mMarkerMap.find(n->getInitial());
     228        auto f = mMarkerMap.find(n->getInitial());       
    228229        assert (f != mMarkerMap.end());
    229230        phi->addIncoming(f->second, whileEntryBlock);
Note: See TracChangeset for help on using the changeset viewer.