Landing: 6712abb759a0
Project / Subsystem
gcc / gcc
Date
2025-12-15
Author
Andrew MacLeod
Commit
6712abb759a0be27cbf3019bf77a313c5bb86796
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc
- patch_id
- —
- commit_hash
- 6712abb759a0be27cbf3019bf77a313c5bb86796
- source_type
- github
- headline
- Handle integer constants up front
- tldr
- The compiler now directly returns an integer constant value when `get_maxval_strlen` is passed an integer constant.
- author
- Andrew MacLeod
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • gcc
- • optimization
- • gimple-fold
- • constant folding
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2025-12-15T00:00:00.000Z
When get_maxval_strlen is called with an integer constant, it now directly returns that constant value rather than performing unnecessary calculations. This simplifies the code and might give a very slight performance increase in some constant-heavy code.