On 8/19/26 9:03 AM, Jovan Dmitrovic wrote:
Function ivopts_estimate_reg_pressure is taxing candidate sets
by the number of candidates included in set. This makes for an
uneven playing field, making it very difficult for larger sets
to be chosen.
In try_improve_iv_set to candidate set another candidate is added
only if the cost improves (therefore prefering fewer candidates
per set), but having reg pressure cost factor in the number of
candidates makes a disbalance when choosing the best option.
gcc/ChangeLog:
* tree-ssa-loop-ivopts.cc (ivopts_estimate_reg_pressure):
Remove n_cands bias from reg pressure cost calculation.
Co-authored-by: Radosav Krunić<[email protected]>
Signed-off-by: Djordje Todorović<[email protected]>
Signed-off-by: Chao-Ying Fu<[email protected]>
Signed-off-by: Jovan Dmitrović<[email protected]>
Signed-off-by: Radosav Krunić<[email protected]>
So I checked this against the V3 patch that Richi already approved.
There weren't any real changes and I've pushed it to the trunk.
jeff