MONDAY, AUGUST 31, 2026
gcc
Optimize value-range-storage to avoid unused field access.
Avoids accessing unused fields in prange_storage::set_prange for correctness and potential minor performance gains.
This commit refactors the set_prange function within value-range-storage.cc to only access bitmask and points_to fields when the relevant kind necessitates it. This change prevents the incorrect or unnecessary access of these fields, addressing a PR for compiler optimization issues.
In Details
The prange_storage::set_prange function in value-range-storage.cc was accessing bitmask and points_to fields unconditionally. This commit introduces a check for the kind of the prange before accessing these fields, ensuring they are only accessed when relevant. This is a correctness fix for specific kind values.