MONDAY, AUGUST 3, 2026
gcc
Convert float_widen_lhs_range to sub-ranges.
Refactors floating-point range widening to use sub-ranges for improved representation.
The float_widen_lhs_range function has been refactored to use sub-ranges, improving the representation and handling of floating-point range widening. This change, tested on ppc64le Linux, is part of ongoing work on the floating-point range analysis in GCC.
In Details
The float_widen_lhs_range function within range-op-float.cc has been converted to operate on and return sub-ranges. This change is part of the broader effort to refine the representation and manipulation of floating-point ranges within GCC's range analysis framework. A new test case, range_op_float_tests, has been added to verify this functionality.
For Context
- range analysis
- A compiler optimization technique that determines the possible range of values a variable can hold during program execution. This information can be used to enable other optimizations, such as constant propagation or dead code elimination.
- floating-point
- A type of number representation used for numbers that have a fractional part. Floating-point arithmetic is inherently imprecise due to the finite number of bits used to represent them.
- sub-range
- A more granular representation of a range, possibly dividing a larger range into smaller, more manageable segments. This can be useful for more precise analysis or manipulation of numerical data.