Ignore:
Timestamp:
Jul 6, 2015, 9:35:48 AM (4 years ago)
Author:
nmedfort
Message:

Next nodes for While statements must be declared similar to how Defined Vars are for Ifs. (Temporarily breaks multiplexing correctness.)

File:
1 edited

Legend:

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

    r4639 r4641  
    996996                }
    997997
    998                 PabloAST * demuxed = Q.front(); Q.pop_front(); assert (demux);
     998                PabloAST * demuxed = Q.front(); Q.pop_front(); assert (demuxed);
    999999                input[i - 1]->replaceWith(demuxed, true, true);
    10001000            }
    10011001
    1002             // simplify(muxed, m, builder);
     1002            simplify(muxed, m, builder);
    10031003        }
    10041004    }
     
    10141014    std::queue<PabloAST *> Q;
    10151015    llvm::DenseMap<PabloAST *, DdNode *> characterization;
    1016     boost::container::flat_set<PabloAST *> uncharacterized;
     1016    flat_set<PabloAST *> uncharacterized;
    10171017
    10181018    DdManager * manager = Cudd_Init(n + mBaseVariables.size(), 0, CUDD_UNIQUE_SLOTS, CUDD_CACHE_SLOTS, 0);
     
    10441044                case PabloAST::ClassTypeId::Sel:
    10451045                    // And it is within the same scope ...
    1046                     if ((stmt = cast<Statement>(user))->getParent() == &builder.getPabloBlock()) {
     1046                    if ((stmt = cast<Statement>(user))->getParent() == builder.getPabloBlock()) {
    10471047                        bool characterized = true;
    10481048                        for (unsigned i = 0; i != stmt->getNumOperands(); ++i) {
     
    11101110    int * cube = nullptr;
    11111111    for (auto itr : outputs) {
     1112
    11121113        // Look into doing some more analysis here to see if a Xor or Sel operation is possible.
    11131114        DdGen * gen = Cudd_FirstCube(manager, itr.second, &cube, &value);
    11141115        while (!Cudd_IsGenEmpty(gen)) {
    1115             // cube[0 ... n - 1] = { 0 : false, 1: true, 2: don't care }
    1116             for (unsigned i = n - 1; i; --i) {
     1116            // cube[0 ... n - 1] = {{ 0 : false, 1: true, 2: don't care }}
     1117            for (unsigned i = 0; i != n; ++i) {
    11171118                if (cube[i] == 0) {
    11181119                    S.push_back(variables[i]);
     
    11301131            }
    11311132
    1132             for (unsigned i = n - 1; i; --i) {
     1133            for (unsigned i = 0; i != n; ++i) {
    11331134                if (cube[i] == 1) {
    11341135                    S.push_back(variables[i]);
Note: See TracChangeset for help on using the changeset viewer.