opt -max_iter#166
Conversation
Greptile SummaryThis PR adds a
Confidence Score: 3/5The PR introduces a default iteration cap of 20 on a pass that previously ran until convergence, which is a silent behavioral change for existing users whose designs may need more iterations. The default of 20 iterations changes the long-standing unconditional convergence behavior of passes/opt/opt.cc — specifically the default value of Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[opt execute] --> B{fast_mode?}
B -- yes --> FM_START[iter = 0]
FM_START --> FM_LOOP[iter++\nopt_expr\nopt_merge\nscratchpad_unset\nopt_dff]
FM_LOOP --> FM_CHK{did_something?}
FM_CHK -- no --> FM_POST[opt_clean after loop]
FM_CHK -- yes --> FM_CLEAN[opt_hier / opt_boundary\nopt_clean]
FM_CLEAN --> FM_MAX{max_iter > 0\nand iter >= max_iter?}
FM_MAX -- yes --> FM_REACHED[reached_max_iter = true]
FM_REACHED --> FM_POST
FM_MAX -- no --> FM_LOG[log Rerunning...]
FM_LOG --> FM_LOOP
FM_POST --> END
B -- no --> NF_INIT[opt_expr\nopt_merge -nomux\niter = 0]
NF_INIT --> NF_LOOP[iter++\nscratchpad_unset\nopt_muxtree/reduce/merge\nopt_share/dff/hier/boundary\nopt_clean\nopt_expr]
NF_LOOP --> NF_CHK{did_something?}
NF_CHK -- no --> END
NF_CHK -- yes --> NF_MAX{max_iter > 0\nand iter >= max_iter?}
NF_MAX -- yes --> NF_REACHED[reached_max_iter = true]
NF_REACHED --> END
NF_MAX -- no --> NF_LOG[log Rerunning...]
NF_LOG --> NF_LOOP
END[design.optimize/sort/check\nlog Finished OPT passes]
Reviews (1): Last reviewed commit: "opt -max_iter" | Re-trigger Greptile |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
If your work is part of a larger effort, please discuss your general plans on Discourse first to align your vision with maintainers.
What are the reasons/motivation for this change?
Explain how this is achieved.
Make sure your change comes with tests. If not possible, share how a reviewer might evaluate it.
These template prompts can be deleted when you're done responding to them.