Changeset 4434


Ignore:
Timestamp:
Jan 22, 2015, 4:56:56 PM (4 years ago)
Author:
nmedfort
Message:

Bug fix for last check in

File:
1 edited

Legend:

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

    r4433 r4434  
    108108            continue;
    109109        }
    110 
    111         // When we're creating the Pablo program, it's possible to have multiple instances of an "identical"
    112         // statement. By recording which statements have already been seen, we can detect the redundant statements
    113         // as any having the same type and operands. If so, we can replace its users with the prior statement.
    114         // and erase this statement from the AST
    115         const auto f = encountered.insert(stmt);
    116         if (!std::get<1>(f)) {
    117             stmt = stmt->replaceWith(std::get<0>(f));
    118             continue;
     110        else {
     111            // When we're creating the Pablo program, it's possible to have multiple instances of an "identical"
     112            // statement. By recording which statements have already been seen, we can detect the redundant statements
     113            // as any having the same type and operands. If so, we can replace its users with the prior statement.
     114            // and erase this statement from the AST
     115            const auto f = encountered.insert(stmt);
     116            if (!std::get<1>(f)) {
     117                stmt = stmt->replaceWith(std::get<0>(f));
     118                continue;
     119            }
    119120        }
    120 
    121121        assert (stmt);
    122122        stmt = stmt->getNextNode();
Note: See TracChangeset for help on using the changeset viewer.