GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc

Check for abnormal ranges on full dom search.

GCC's range analysis now considers abnormal edges throughout dominator searches, improving accuracy.

GCC’s ranger_cache::range_from_dom function has been updated to track abnormal edges during the entire dominator search. Previously, inferred ranges were not added if the predecessor was an abnormal edge. This change enhances the analysis by correctly handling abnormal control flow paths, leading to more accurate range inferences.

In Details

The ranger_cache::range_from_dom function's logic for adding inferred ranges was too restrictive, failing to account for abnormal edges anywhere in the dominator search path. This commit modifies the function to track abnormal edges encountered throughout the entire dominator search, ensuring that range calculations are not prematurely aborted due to an early abnormal edge, thus improving the accuracy of range analysis in complex control flow graphs.

For Context
Abnormal Edge
In control flow graphs, an edge that represents a non-standard control flow transfer, such as exceptions or long jumps.
Dominator Search
An algorithm used in compiler optimization to find the dominator tree of a control flow graph, identifying basic blocks that must be executed before others.
Range Cache
A data structure used by GCC to store and efficiently retrieve calculated value ranges for expressions and variables.
Filed Under: compileroptimizationcontrol flow