hppa: Reduce r1 register pressure with alternative load sequences.
HPPA backend avoids r1 register pressure by using ldil/addl sequences for symbolic operand loading.
The HPPA backend has introduced an alternative instruction sequence (ldil/addl) to load the high part of symbolic operands, reducing pressure on the r1 register. This change aims to prevent compilation failures caused by the lack of available registers for spilling, offering a less costly alternative than spilling r1 itself. A note is included regarding a limitation with PIC code linking into non-PIC executables.
In Details
To mitigate LRA (Local Register Allocation) failures on HPPA due to r1 register pressure, this commit adds alternative instruction sequences using ldil/addl for loading the high part of symbolic operands. This avoids the direct use of r1 by addil, which can occur when loading symbolic constants. The ldil/addl sequence is less costly than spilling r1. An exception noted is the handling of PIC code linking into non-PIC executables, where GNU ld currently requires addil for DP register updates.
- HPPA
- Hewlett-Packard Precision Architecture, a RISC instruction set architecture.
- register pressure
- A measure of how many registers are needed concurrently by a program, influencing the frequency of spills and reloads.
- LRA
- Local Register Allocation. A phase in register allocation that works within basic blocks.
- spill
- The process of storing a register's value into memory when no free registers are available.
- symbolic operand
- An operand whose value is not known at compile time and is represented symbolically, often a global variable or constant.
- PIC
- Position-Independent Code. Code that can be loaded and executed at any memory address without modification.
- DP register
- Data Pointer register, often used in PIC code to address global data.