Ignore:
Timestamp:
Sep 14, 2016, 2:56:54 PM (3 years ago)
Author:
nmedfort
Message:

Work on multiplexing and distribution passes + a few AST modification bug fixes.

File:
1 edited

Legend:

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

    r5152 r5156  
    3333        inline CharacterizationMap() : mPredecessor(nullptr) {}
    3434        inline CharacterizationMap(CharacterizationMap & predecessor) : mPredecessor(&predecessor) {}
     35        CharacterizationMap * predecessor() const { return mPredecessor; }
    3536    private:
    3637        CharacterizationMap * const     mPredecessor;
     
    4142protected:
    4243
    43     BooleanReassociationPass(Z3_context ctx, Z3_solver solver, PabloFunction & f);
     44    BooleanReassociationPass(Z3_context ctx, Z3_params params, Z3_tactic tactic, PabloFunction & f);
    4445    bool processScopes(PabloFunction & function);
    4546    void processScopes(PabloBlock * const block, CharacterizationMap & map);
    46     void distributeScope(PabloBlock * const block, CharacterizationMap & map);
     47    void distributeScope(PabloBlock * const block, CharacterizationMap & C);
    4748
    48     void transformAST(PabloBlock * const block, CharacterizationMap & C, Graph & G);
    49     void resolveNestedUsages(PabloBlock * const block, PabloAST * const expr, const Vertex u, CharacterizationMap &C, StatementMap & S, Graph & G, const Statement * const ignoreIfThis = nullptr) const;
     49    void transformAST(CharacterizationMap & C, Graph & G);
     50    void resolveNestedUsages(PabloAST * const expr, const Vertex u, CharacterizationMap &C, StatementMap & S, Graph & G, const Statement * const ignoreIfThis = nullptr) const;
    5051
    51     bool contractGraph(StatementMap & M, Graph & G) const;
     52    bool contractGraph(Graph & G) const;
    5253
    53     bool reduceGraph(CharacterizationMap & C, StatementMap & S, Graph & G) const;
     54    bool reduceVertex(const Vertex u, CharacterizationMap & C, VertexMap & M, Graph & G, const bool use_expensive_simplification) const;
     55    bool reduceGraph(CharacterizationMap & C, VertexMap & M, Graph & G) const;
    5456
    5557    bool factorGraph(const PabloAST::ClassTypeId typeId, Graph & G, std::vector<Vertex> & factors) const;
     
    6264    void removeVertex(const Vertex u, Graph & G) const;
    6365
    64     bool redistributeGraph(CharacterizationMap & C, StatementMap & M, Graph & G) const;
     66    bool redistributeGraph(CharacterizationMap & C, VertexMap & M, Graph & G) const;
    6567
    66     void rewriteAST(PabloBlock * const block, Graph & G);
     68    bool rewriteAST(CharacterizationMap & C, VertexMap &M, Graph & G);
    6769
    6870    Statement * characterize(Statement * const stmt, CharacterizationMap & map);
     71
     72    Z3_ast simplify(Z3_ast node, bool use_expensive_minimization = false) const;
    6973
    7074    Z3_ast makeVar() const;
    7175
    7276private:
     77    PabloBlock *                mBlock;
    7378    Z3_context const            mContext;
    74     Z3_solver const             mSolver;
     79    Z3_params const             mParams;
     80    Z3_tactic const             mTactic;
    7581    Z3_ast                      mInFile;
    7682    PabloFunction &             mFunction;
Note: See TracChangeset for help on using the changeset viewer.