Changeset 4679 for icGREP


Ignore:
Timestamp:
Jul 16, 2015, 11:39:43 AM (4 years ago)
Author:
cameron
Message:

whiles may be nested within ifs

Location:
icGREP/icgrep-devel/icgrep/pablo
Files:
2 edited

Legend:

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

    r4676 r4679  
    8585            PabloBlockCarryData & nestedBlockData = ifStatement->getBody().carryData;
    8686            nestedBlockData.ifDepth = ifDepth + 1;
     87            nestedBlockData.whileDepth = whileDepth;
    8788            const unsigned ifCarryDataBits = nestedBlockData.enumerate(ifStatement->getBody());
    8889#ifdef PACKING
     
    9697        else if (While * whileStatement = dyn_cast<While>(stmt)) {
    9798            PabloBlockCarryData & nestedBlockData = whileStatement->getBody().carryData;
     99            nestedBlockData.ifDepth = ifDepth;
    98100            nestedBlockData.whileDepth = whileDepth + 1;
    99101            unsigned whileCarryDataBits = nestedBlockData.enumerate(whileStatement->getBody());
  • icGREP/icgrep-devel/icgrep/pablo/pablo_compiler.cpp

    r4676 r4679  
    546546
    547547    mBuilder->SetInsertPoint(whileEndBlock);
     548    if (mCarryManager->blockHasCarries()) {
     549        mCarryManager->generateCarryOutSummaryCodeIfNeeded();
     550    }
    548551    --mWhileDepth;
    549552
Note: See TracChangeset for help on using the changeset viewer.