Landing: 2c1e97207485

Project / Subsystem

gcc / ivopts

Date

2026-08-29

Author

Jovan Dmitrovic

Commit

2c1e97207485e54ab6ae085f76c07e62a14440ae

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
ivopts
patch_id
—
commit_hash
2c1e97207485e54ab6ae085f76c07e62a14440ae
source_type
github
headline
ivopts: Remove bias from register pressure cost calculation.
tldr
Loop invariant optimization pass removes a bias in register pressure cost that unfairly penalized larger candidate sets.
author
Jovan Dmitrovic
outcome
committed
performance_win
true
breaking_change
false
series_id
gcc:ivopts: remove bias from calculating reg pressure cost
series_parts
[]
tags
  • • optimization
  • • compiler
discussion_id_link
—
bugzilla_pr
—
date
2026-08-29T00:00:00.000Z

The ivopts_estimate_reg_pressure function was previously biased by the number of candidates in a set, making larger sets less likely to be chosen. This change removes that bias, allowing the optimizer to more fairly evaluate sets with varying numbers of loop-invariant candidates, improving the selection of optimal candidate sets.