Ignore:
Timestamp:
Jul 23, 2015, 11:17:02 PM (4 years ago)
Author:
nmedfort
Message:

Bug fixes for last check in.

File:
1 edited

Legend:

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

    r4692 r4695  
    101101bool AutoMultiplexing::optimize(PabloFunction & function) {
    102102
    103     std::random_device rd;
    104     const auto seed = rd(); // 83234827342;
     103    // std::random_device rd;
     104    const auto seed = 83234827342;
    105105    RNG rng(seed);
    106106
     
    443443    if (LLVM_UNLIKELY(NoSatisfyingAssignment(bdd))) {
    444444        Deref(bdd);
    445         // If there is no satisfing assignment for this bdd, the statement will always produce
    446         // 0. If this is an Assign or Next node, replace the value with 0. Otherwise replace
    447         // the statement with 0.
    448         if (LLVM_UNLIKELY(isa<Assign>(stmt) || isa<Next>(stmt))) {
     445        // If there is no satisfing assignment for this bdd, the statement will always produce 0.
     446        // We can safely replace this statement with 0 unless it is an Advance, Assign or Next node.
     447        // Those must be handled specially or we may end up producing a non-equivalent function.
     448        if (LLVM_UNLIKELY(isa<Advance>(stmt) || isa<Assign>(stmt) || isa<Next>(stmt))) {
    449449            stmt->setOperand(0, stmt->getParent()->createZeroes());
    450450        }
Note: See TracChangeset for help on using the changeset viewer.