Ignore:
Timestamp:
Jan 13, 2015, 4:01:06 PM (5 years ago)
Author:
nmedfort
Message:

Many use def info changes; removed dependency on boost system library. More work still needed on CSE.

File:
1 edited

Legend:

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

    r4415 r4416  
    11#include <pablo/ps_if.h>
    22#include <pablo/codegenstate.h>
     3#include <pablo/ps_assign.h>
    34
    45namespace pablo {
     
    2021    // embedded into the If, the defined var is a user of the If node.
    2122
    22     for (Assign * x : mDefined) {
    23         addUser(x);
     23    for (PabloAST * assign : mDefined) {
     24        assign->addUser(this);
     25        addUser(assign);
     26    }
     27}
     28
     29void If::replaceCondOrDefinedVar(PabloAST * from, PabloAST * to) {
     30    if (mOperand[0] == from) {
     31        mOperand[0] = to;
     32    }
     33    if (isa<Statement>(from) && mDefined.remove(cast<Statement>(from))) {
     34        if (isa<Statement>(to)) {
     35            mDefined.insert(cast<Statement>(to));
     36        }
    2437    }
    2538}
Note: See TracChangeset for help on using the changeset viewer.