mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-25 01:55:33 +00:00
Propagate const_fold through generate blocks and branches
This commit is contained in:
parent
9a4f420b4b
commit
2ee0b8ebea
2 changed files with 43 additions and 4 deletions
|
@ -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]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue