Changeset 4690 for icGREP


Ignore:
Timestamp:
Jul 22, 2015, 11:33:44 AM (4 years ago)
Author:
cameron
Message:

ensure initial scope is set

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

Legend:

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

    r4689 r4690  
    3333unsigned CarryManager::initialize(PabloBlock * pb, Value * carryPtr) {
    3434    mPabloRoot = pb;
    35     mCurrentScope = pb;
    36     mCurrentScopeIndex = 0;
    37    
    3835    mCarryDataPtr = carryPtr;
    3936    unsigned scopeCount = doScopeCount(pb);
     
    5047    mCarryOutVector.resize(mTotalCarryDataBitBlocks);
    5148   
     49    /*  Set the current scope to PabloRoot */
     50    mCurrentScope = mPabloRoot;
     51    mCurrentScopeIndex = 0;
     52    mCarryInfo = mCarryInfoVector[0];
     53
    5254    return mTotalCarryDataBitBlocks;
    5355}
     
    175177
    176178Value * CarryManager::unitAdvanceCarryInCarryOut(int localIndex, Value * strm) {
     179   
    177180    unsigned carryDataIndex = mCurrentScopeIndex + mCarryInfo->unitAdvanceCarryDataOffset(localIndex);
    178181    mCarryOutVector[carryDataIndex] = strm;
  • icGREP/icgrep-devel/icgrep/pablo/pablo_compiler.cpp

    r4688 r4690  
    178178        }
    179179    }
    180        
    181     mCarryOffset = mCarryManager->initialize(&(function.getEntryBlock()), mCarryDataPtr);
     180     
     181    PabloBlock & mainScope = function.getEntryBlock();
     182
     183    mCarryOffset = mCarryManager->initialize(&mainScope, mCarryDataPtr);
    182184   
    183185    //Generate the IR instructions for the function.
    184     compileBlock(function.getEntryBlock());
     186   
     187    compileBlock(mainScope);
    185188   
    186189    mCarryManager->generateBlockNoIncrement();
Note: See TracChangeset for help on using the changeset viewer.