Landing: d1bfa577693f

Project / Subsystem

gcc / ada

Date

2026-09-22

Author

Eric Botcazou

Commit

d1bfa577693f373de7080dd0c585fd9ce1e21cf1

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
ada
patch_id
—
commit_hash
d1bfa577693f373de7080dd0c585fd9ce1e21cf1
source_type
github
headline
Ada: Uniform expansion for conditional expressions
tldr
Optimizes expansion of conditional expressions (if, case) in Ada, reducing temporaries and avoiding indirections.
author
Eric Botcazou
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • ada
  • • compiler
  • • optimization
  • • code-generation
discussion_id_link
—
bugzilla_pr
—
date
2026-09-22T00:00:00.000Z

This commit refactors how Ada conditional expressions, specifically N_Case_Expression and N_If_Expression, are expanded. It introduces a single, uniform criterion for deciding when to create temporary variables, aiming to eliminate large temporaries for N_If_Expression and N_Expression_With_Actions and avoid indirection for N_Case_Expression. The layout machinery is also improved to compute array type sizes more accurately, addressing issues with Component_Size clauses.