FRIDAY, APRIL 17, 2026
rfc — Proposed
Consider adding another pass_late_combine after pass_reorder_blocks
Adding another pass_cprop_hardreg after pass_reorder_blocks shows code size improvements in x86_64 Linux kernel builds.
Uros Bizjak reports that adding an additional pass_cprop_hardreg after pass_reorder_blocks results in code size reductions for x86_64 Linux kernel builds. The results suggest a benefit from performing constant propagation after basic block reordering.
Technical Tradeoffs
- Adding compiler passes increases compilation time.
- The code size improvement may be architecture-specific or depend on the input code.
- The benefit of the additional pass needs to be weighed against the cost of maintaining another pass in the compiler.
- Consider whether a late combine entry, invoked only when BB reordering duplicates paths, would be sufficient.