Landing: 683b5ca6a5b4

Project / Subsystem

gcc / cselib

Date

2026-05-20

Author

Richard Sandiford

Commit

683b5ca6a5b47b173d371d40114d07a7cbcb394f

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
cselib
patch_id
commit_hash
683b5ca6a5b47b173d371d40114d07a7cbcb394f
source_type
github
headline
cselib: Cache CSELIB_VAL_PTR in new_elt_loc_list
tldr
This commit caches `CSELIB_VAL_PTR` in `new_elt_loc_list` for improved readability and minor optimization.
author
Richard Sandiford
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • cselib
  • optimization
  • readability
discussion_id_link
bugzilla_pr
date
2026-05-20T00:00:00.000Z

The code in new_elt_loc_list was accessing one value directly and another indirectly using CSELIB_VAL_PTR. This commit caches the result of CSELIB_VAL_PTR so all updates are done on direct cselib_val pointers, improving code readability. This change also provides a minor optimization, especially when RTL checking is enabled.