Ignore:
Timestamp:
Aug 31, 2015, 12:23:17 PM (4 years ago)
Author:
nmedfort
Message:

Removed dummy nodes from the reassociation pass and have edges pointing to the if/while node instead to allow for proper topological ordering.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/optimizers/booleanreassociationpass.h

    r4751 r4753  
    33
    44#include <pablo/codegenstate.h>
     5#include <boost/container/flat_map.hpp>
     6#include <boost/graph/adjacency_list.hpp>
    57
    68namespace pablo {
    79
    8 class BooleanReassociationPass {   
     10class BooleanReassociationPass {
     11    using Graph = boost::adjacency_list<boost::hash_setS, boost::vecS, boost::bidirectionalS, PabloAST *>;
    912public:
    1013    static bool optimize(PabloFunction & function);
    1114protected:
    1215    BooleanReassociationPass();
    13     void scan(PabloFunction & function);
    14     void scan(PabloBlock & block, std::vector<Statement *> && terminals);
     16    void resolveScopes(PabloFunction & function);
     17    void resolveScopes(PabloBlock &block);
     18    void processScopes(PabloFunction & function);
     19    void processScopes(PabloBlock & block, std::vector<Statement *> && terminals);
    1520    void processScope(PabloBlock & block, std::vector<Statement *> && terminals);
     21    void summarizeAST(PabloBlock & block, std::vector<Statement *> && terminals, Graph & G);
     22private:
     23    boost::container::flat_map<PabloBlock *, Statement *> mResolvedScopes;
    1624};
    1725
Note: See TracChangeset for help on using the changeset viewer.