SUNDAY, AUGUST 9, 2026
gcc Performance Win
Stream frange sub-ranges during LTO.
Improves LTO efficiency by streaming frange sub-ranges, reducing memory usage.
This commit enhances the Link Time Optimization (LTO) process by streaming individual sub-ranges of franges. The data-streamer-out.cc and data-streamer-in.cc files are updated to handle the streaming and reading of these sub-ranges, respectively. This approach is expected to reduce memory consumption during LTO.
In Details
Changes to data-streamer-out.cc and data-streamer-in.cc streamline the serialization of frange values for LTO. Specifically, streamer_write_vrange now streams each sub-range individually, and streamer_read_value_range is updated to read them. This optimizes memory usage for LTO by avoiding the materialization of the entire range set.
For Context
- LTO
- Link Time Optimization. A compilation technique where optimizations are performed at link time, allowing the linker to have a view of the entire program. This can lead to more aggressive optimizations than traditional compile-time optimizations.
- frange
- Likely refers to 'floating-point range' or a similar concept within GCC's internal representation. It represents a range of possible floating-point values.
- sub-range
- A smaller, contiguous portion of a larger range. In this context, it implies breaking down a floating-point range into smaller, manageable segments.