GCC Newspaper
JULY 29, 2026
Date
/
Architectures
Components
Topics
News & Policy
sh

SH: Switch to LRA permanently

The SH backend permanently enables the Long-Range Addresser (LRA) register allocator, removing the old option.

The SH backend has permanently enabled its Long-Range Addresser (LRA) register allocator, addressing PR target/55212. The -mlra option is now ignored but kept for compatibility, and the TARGET_LRA_P macro has been removed. This change signifies LRA as the default and only register allocation strategy for SH targets.

In Details

This commit removes the -mlra option from sh.opt and doc/invoke.texi, and disables the TARGET_LRA_P macro in sh.cc for the SH target. The sh_lra_p function now unconditionally returns true, permanently enabling LRA as the register allocator for SH, as resolved by PR target/55212.

For Context
LRA
Long-Range Addresser, a register allocator in GCC designed to handle complex register allocation scenarios, particularly in architectures with large register files or specific addressing constraints.
SH
SuperH, a family of 32-bit RISC microcontrollers and microprocessors developed by Hitachi.
Filed Under: shregister allocation