mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 06:03:23 +00:00
Merge pull request #2479 from zachjs/const-arg-hint
Allow constant function calls in constant function arguments
This commit is contained in:
commit
3e67ab1ebb
2 changed files with 14 additions and 0 deletions
|
@ -1205,6 +1205,11 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage,
|
|||
current_block = this;
|
||||
current_block_child = children[i];
|
||||
}
|
||||
if (!in_param_here && type == AST_FCALL) {
|
||||
bool recommend_const_eval = false;
|
||||
bool require_const_eval = has_const_only_constructs(recommend_const_eval);
|
||||
in_param_here = recommend_const_eval || require_const_eval;
|
||||
}
|
||||
if ((type == AST_ALWAYS || type == AST_INITIAL) && children[i]->type == AST_BLOCK)
|
||||
current_top_block = children[i];
|
||||
if (i == 0 && child_0_is_self_determined)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue