GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc Performance Win

Unify `range_of_address` for Consistent Range Handling

`range_of_address` now behaves consistently with other range analysis routines, enabling post-calculation processing.

This commit modifies the range_of_address function to align its behavior with other range analysis routines in GCC. Previously, range_of_address would return immediately, skipping potential post-calculation processing. The change integrates range_of_address into the nested ‘if’ structure used by other routines, ensuring consistent handling and enabling further analysis and optimization.

In Details

The commit modifies fold_using_range::fold_stmt in gimple-range-fold.cc to move the range_of_address call into a nested 'if' block. This ensures that post-calculation processing, which was previously skipped, is now performed. The change ensures consistent behaviour with other range_of_* routines.

For Context

GCC's range analysis tries to determine the possible values each variable or expression can take. range_of_address specifically deals with determining the range of memory addresses. This change makes sure that range_of_address goes through the same processing steps as other similar functions, which could allow for more accurate and effective optimizations.

Filed Under: optimizationrange analysis