diff options
author | Morgan Deters <mdeters@gmail.com> | 2012-06-09 00:35:38 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2012-06-09 00:35:38 +0000 |
commit | 700689a4e4ed42b5198816611eac5bcc1278284d (patch) | |
tree | 0d6029f9bc4f46a721930a27a47ac487771c452e /src/expr/node_value.cpp | |
parent | a0411d4baad389ce88d4bd26edc8ed811625887c (diff) |
Dagification of output expressions.
By default, common subexpressions are dagified if they appear > 1 time and are not constants or variables.
This can be changed with --default-expr-dag=N --- N is a threshold such that if the subexpression occurs > N
times, it is dagified; a setting of 0 turns off dagification entirely.
If you notice strange dumping behavior (taking too long to print anything, e.g.), revert to the old behavior
with --default-expr-dag=0 and let me know of the problem.
Diffstat (limited to 'src/expr/node_value.cpp')
-rw-r--r-- | src/expr/node_value.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/expr/node_value.cpp b/src/expr/node_value.cpp index 970d2e0fc..dbf706c45 100644 --- a/src/expr/node_value.cpp +++ b/src/expr/node_value.cpp @@ -45,14 +45,14 @@ string NodeValue::toString() const { return ss.str(); } -void NodeValue::toStream(std::ostream& out, int toDepth, bool types, +void NodeValue::toStream(std::ostream& out, int toDepth, bool types, size_t dag, OutputLanguage language) const { // Ensure that this node value is live for the length of this call. // It really breaks things badly if we don't have a nonzero ref // count, even just for printing. RefCountGuard guard(this); - Printer::getPrinter(language)->toStream(out, TNode(this), toDepth, types); + Printer::getPrinter(language)->toStream(out, TNode(this), toDepth, types, dag); } void NodeValue::printAst(std::ostream& out, int ind) const { |