Ignore:
Timestamp:
Sep 23, 2016, 4:12:41 PM (3 years ago)
Author:
nmedfort
Message:

Initial work for incorporating Types into Pablo AST.

File:
1 edited

Legend:

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

    r5082 r5160  
    239239inline unsigned scopeDepthOf(const PabloBlock * block) {
    240240    unsigned depth = 0;
    241     for (; block; ++depth, block = block->getParent());
     241    for (; block; ++depth, block = block->getPredecessor ());
    242242    return depth;
    243243}
     
    267267        // the scope tree until both scopes are at the same depth.
    268268        while (depth1 > depth2) {
    269             scope1 = scope1->getParent();
     269            scope1 = scope1->getPredecessor ();
    270270            --depth1;
    271271        }
    272272        while (depth1 < depth2) {
    273             scope2 = scope2->getParent();
     273            scope2 = scope2->getPredecessor ();
    274274            --depth2;
    275275        }
     
    278278        // the LCA of our original pair.
    279279        while (scope1 != scope2) {
    280             scope1 = scope1->getParent();
    281             scope2 = scope2->getParent();
     280            scope1 = scope1->getPredecessor ();
     281            scope2 = scope2->getPredecessor ();
    282282        }
    283283        assert (scope1 && scope2);
     
    297297            assert (scope);
    298298            user = scope->getBranch();
    299             scope = scope->getParent();
     299            scope = scope->getPredecessor ();
    300300        }
    301301        usages.insert(user);
Note: See TracChangeset for help on using the changeset viewer.