Ignore:
Timestamp:
Jan 10, 2015, 3:14:51 PM (4 years ago)
Author:
nmedfort
Message:

More work on usedef info.

File:
1 edited

Legend:

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

    r4414 r4415  
    77: Statement(ClassTypeId::If, {expr}, nullptr, parent)
    88, mBody(body)
    9 , mDefined(std::move(definedVars))
     9, mDefined(definedVars.begin(), definedVars.end())
    1010, mCarryCount(0)
    1111, mAdvanceCount(0)
    1212{
     13    // Conceptually, having a defined var X is identical to having:
     14    //
     15    // Assign(X, 0)
     16    // If (...)
     17    //    Next(Assign(X), ...)
     18    //
     19    // Since the implied 'Next' node is a user of the Assign node, and the Assign node is
     20    // embedded into the If, the defined var is a user of the If node.
    1321
     22    for (Assign * x : mDefined) {
     23        addUser(x);
     24    }
    1425}
    1526
Note: See TracChangeset for help on using the changeset viewer.