Ignore:
Timestamp:
Jun 3, 2015, 11:43:51 PM (4 years ago)
Author:
nmedfort
Message:

More multiplexing work; passes make check.

File:
1 edited

Legend:

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

    r4586 r4592  
    9898}
    9999
    100 
    101 
    102100void Statement::setOperand(const unsigned index, PabloAST * const value) {
    103101    assert (value);
     
    113111    unsigned count = 0;
    114112    for (unsigned i = 0; i != getNumOperands(); ++i) {
    115         count += (getOperand(index) == priorValue) ? 1 : 0;
     113        count += (getOperand(i) == priorValue) ? 1 : 0;
    116114    }
    117115    assert (count >= 1);
     
    175173            mNext->mPrev = mPrev;
    176174        }
    177     }   
     175    }
    178176    mPrev = nullptr;
    179177    mNext = nullptr;
     
    183181
    184182Statement * Statement::eraseFromParent(const bool recursively) {
    185 
    186183    // remove this statement from its operands' users list
    187184    for (auto i = 0; i != mOperands; ++i) {
    188         PabloAST * const op = mOperand[i];
    189         op->removeUser(this);
    190     }
    191 
     185        mOperand[i]->removeUser(this);
     186    }
    192187    if (recursively) {
    193188        for (auto i = 0; i != mOperands; ++i) {
     
    212207        }
    213208    }
    214     replaceAllUsesWith(expr);
     209    replaceAllUsesWith(expr);   
    215210    return eraseFromParent(recursively);
    216211}
Note: See TracChangeset for help on using the changeset viewer.