Landing: bfa1d5cae14f

Project / Subsystem

gcc / ifcvt

Date

2026-07-22

Author

Kyrylo Tkachov

Commit

bfa1d5cae14f9ce8bf399e6a3751174417970869

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
ifcvt
patch_id
—
commit_hash
bfa1d5cae14f9ce8bf399e6a3751174417970869
source_type
github
headline
ifcvt: Consolidate cost estimation for noce original regions.
tldr
Consolidates redundant cost estimation logic in the ifcvt pass for better code reuse.
author
Kyrylo Tkachov
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • refactor
  • • optimization
discussion_id_link
—
bugzilla_pr
—
date
2026-07-22T00:00:00.000Z

This commit refactors the GCC ifcvt pass by consolidating redundant cost estimation logic in noce_process_if_block. Previously, the cost of a removed branch was estimated twice: once for multiple-set and once for single-set paths, using similar calculations. The new noce_original_region_cost function centralizes this calculation. The commit also renames old_cost to base_cost for clarity and hoists a common speed test, improving code maintainability without functional changes.