Landing: 8cfdd1ed0f0d
Project / Subsystem
gcc / gcc/frange
Date
2026-07-30
Author
Aldy Hernandez
Commit
8cfdd1ed0f0da83a8426ac6a30e33dc945fbfcde
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc/frange
- patch_id
- —
- commit_hash
- 8cfdd1ed0f0da83a8426ac6a30e33dc945fbfcde
- source_type
- github
- headline
- Rewrite union to merge sub-ranges.
- tldr
- frange::union_ operation now correctly merges sub-ranges instead of widening to the hull.
- author
- Aldy Hernandez
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • value-range analysis
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-30T00:00:00.000Z
The frange::union_ operation has been rewritten to correctly handle and merge sub-ranges. Previously, it would widen the result to the outer bounds (hull) of the combined ranges, losing precision. The new implementation merges the sub-ranges of both operands, resulting in a more accurate representation of the union, although currently, due to MAX_PAIRS still being one, the result is collapsed back to a single range by set_pairs. This change is a preparatory step for future enhancements.