Ignore:
Timestamp:
Oct 5, 2015, 8:30:12 AM (4 years ago)
Author:
cameron
Message:

Encapsulating all-zeroes and all-ones initializers within IDISA builder

File:
1 edited

Legend:

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

    r4820 r4821  
    6464, mWhileDepth(0)
    6565, mIfDepth(0)
    66 , mZeroInitializer(ConstantAggregateZero::get(mBitBlockType))
    67 , mOneInitializer(ConstantVector::getAllOnesValue(mBitBlockType))
    6866, mFunction(nullptr)
    6967, mInputAddressPtr(nullptr)
     
    119117    iBuilder.initialize(mMod, mBuilder);
    120118
    121     mCarryManager = new CarryManager(mBuilder, mBitBlockType, mZeroInitializer, &iBuilder);
     119    mCarryManager = new CarryManager(mBuilder, &iBuilder);
    122120   
    123121    if (DumpTrace) DeclareDebugFunctions();
     
    310308        auto f = mMarkerMap.find(assign);
    311309        assert (f != mMarkerMap.end());
    312         phi->addIncoming(mZeroInitializer, ifEntryBlock);
     310        phi->addIncoming(iBuilder.allZeroes(), ifEntryBlock);
    313311        phi->addIncoming(f->second, ifBodyFinalBlock);
    314312        mMarkerMap[assign] = phi;
     
    516514Value * PabloCompiler::compileExpression(const PabloAST * expr) {
    517515    if (isa<Ones>(expr)) {
    518         return mOneInitializer;
     516        return iBuilder.allOnes();
    519517    }
    520518    else if (isa<Zeroes>(expr)) {
    521         return mZeroInitializer;
     519        return iBuilder.allZeroes();
    522520    }
    523521    auto f = mMarkerMap.find(expr);
Note: See TracChangeset for help on using the changeset viewer.