|
| virtual | ~ExprRewriter () |
| | virtual destructor More...
|
| |
| Expr | operator() (const Expr &pre, const Expr &post) |
| | Same as call. More...
|
| |
| virtual Expr | Rewrite (const Expr &pre, const Expr &post) |
| | The functor call. More...
|
| |
| virtual Expr | Rewrite_ (const VarNode *pre, const Expr &post) |
| |
| virtual Expr | Rewrite_ (const GlobalVarNode *pre, const Expr &post) |
| |
| virtual Expr | Rewrite_ (const ConstantNode *pre, const Expr &post) |
| |
| virtual Expr | Rewrite_ (const TupleNode *pre, const Expr &post) |
| |
| virtual Expr | Rewrite_ (const FunctionNode *pre, const Expr &post) |
| |
| virtual Expr | Rewrite_ (const CallNode *pre, const Expr &post) |
| |
| virtual Expr | Rewrite_ (const LetNode *pre, const Expr &post) |
| |
| virtual Expr | Rewrite_ (const IfNode *pre, const Expr &post) |
| |
| virtual Expr | Rewrite_ (const OpNode *pre, const Expr &post) |
| |
| virtual Expr | Rewrite_ (const TupleGetItemNode *pre, const Expr &post) |
| |
| virtual Expr | Rewrite_ (const RefCreateNode *pre, const Expr &post) |
| |
| virtual Expr | Rewrite_ (const RefReadNode *pre, const Expr &post) |
| |
| virtual Expr | Rewrite_ (const RefWriteNode *pre, const Expr &post) |
| |
| virtual Expr | Rewrite_ (const ConstructorNode *pre, const Expr &post) |
| |
| virtual Expr | Rewrite_ (const MatchNode *pre, const Expr &post) |
| |
A non-iterating Expression Rewriter.
ExprRewriter provides a Rewrite interface for modifying graphs in Post-DFS order.
The expectation is that ExprRewriter objects will be passed to PostOrderRewrite, which will non-recursively unroll the graph and call Rewriting on inputs. It will then pass the original node, called pre, and a node recreated with any alterned inputs, called post, to the ExprRewriter. The ExprRewriter can then use the information in those two nodes to do more complex graph rewriting.