GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
alpha

Enable LRA by default on Alpha BWX targets and add -mlra option

Alpha architecture now defaults to using the new register allocator (LRA) on BWX targets.

The Alpha architecture now supports the -mlra option and enables the new register allocator (LRA) by default on BWX (Byte, Word, and eXtreme) targets. This change aligns with the planned removal of the older ‘reload’ mechanism. LRA is gated on TARGET_BWX because non-BWX targets have known issues with LRA handling of spilled QImode or HImode pseudos. The default behavior, controlled by alpha_option_override, dynamically tracks CPU types like ev56 (BWX) which enables LRA, while older CPUs like ev4 (non-BWX) continue to use reload.

In Details

This commit transitions the Alpha backend to use the new register allocator (LRA) by default on BWX targets, while retaining the old 'reload' mechanism as a fallback via -mno-lra. The default enablement is gated on TARGET_BWX due to existing bugs in LRA's handling of spilled QImode/HImode pseudos on non-BWX targets (tracked in PR117185). LRA is activated based on the configured CPU type (e.g., ev56 enables it, ev4 does not), ensuring stability while phasing out reload.

For Context
LRA
Local Register Allocation, a new register allocation strategy in GCC intended to replace the older 'reload' mechanism.
Reload
The older, traditional register allocation and spilling mechanism in GCC.
Alpha
A 64-bit RISC instruction set architecture originally developed by Digital Equipment Corporation.
BWX
Byte, Word, and eXtreme instructions on the Alpha architecture, referring to support for byte, word, and potentially other granular memory accesses.
QImode
GCC's internal mode for an 8-bit integer.
HImode
GCC's internal mode for a 16-bit integer.
PR117185
A GCC bug report number tracking issues with LRA on non-BWX Alpha targets.
Filed Under: alpharegister allocationtarget