diff options
author | Zachary Snow <zach@zachjs.com> | 2020-08-09 09:52:55 -0600 |
---|---|---|
committer | Zachary Snow <zach@zachjs.com> | 2020-08-09 17:21:08 -0400 |
commit | 2ee0b8ebeacb8f4324545bbbc5003ddc3d96a6c5 (patch) | |
tree | dfd799cefa251c6a46feb463fadd39092dcc3bf2 /frontends | |
parent | 9a4f420b4b8285bd05181b6988c35ce45e3c979a (diff) | |
download | yosys-2ee0b8ebeacb8f4324545bbbc5003ddc3d96a6c5.tar.gz yosys-2ee0b8ebeacb8f4324545bbbc5003ddc3d96a6c5.tar.bz2 yosys-2ee0b8ebeacb8f4324545bbbc5003ddc3d96a6c5.zip |
Propagate const_fold through generate blocks and branches
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/ast/simplify.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 66f22e113..fb23b0644 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -1807,7 +1807,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage, if (type == AST_GENFOR) { for (size_t i = 0; i < buf->children.size(); i++) { - buf->children[i]->simplify(false, false, false, stage, -1, false, false); + buf->children[i]->simplify(const_fold, false, false, stage, -1, false, false); current_ast_mod->children.push_back(buf->children[i]); } } else { @@ -1883,7 +1883,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage, } for (size_t i = 0; i < children.size(); i++) { - children[i]->simplify(false, false, false, stage, -1, false, false); + children[i]->simplify(const_fold, false, false, stage, -1, false, false); current_ast_mod->children.push_back(children[i]); } @@ -1920,7 +1920,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage, } for (size_t i = 0; i < buf->children.size(); i++) { - buf->children[i]->simplify(false, false, false, stage, -1, false, false); + buf->children[i]->simplify(const_fold, false, false, stage, -1, false, false); current_ast_mod->children.push_back(buf->children[i]); } @@ -1999,7 +1999,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage, } for (size_t i = 0; i < buf->children.size(); i++) { - buf->children[i]->simplify(false, false, false, stage, -1, false, false); + buf->children[i]->simplify(const_fold, false, false, stage, -1, false, false); current_ast_mod->children.push_back(buf->children[i]); } |