mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-23 01:25:32 +00:00
ARM: When spilling extra registers for alignment, prefer low registers on all Thumb targets.
This makes it more likely that we can use the 16-bit push and pop instructions on Thumb-2, saving around 4 bytes per function. Differential Revision: http://reviews.llvm.org/D9165 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235637 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1688,8 +1688,8 @@ ARMFrameLowering::processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
|
||||
if (CS1Spilled && !UnspilledCS1GPRs.empty()) {
|
||||
for (unsigned i = 0, e = UnspilledCS1GPRs.size(); i != e; ++i) {
|
||||
unsigned Reg = UnspilledCS1GPRs[i];
|
||||
// Don't spill high register if the function is thumb1
|
||||
if (!AFI->isThumb1OnlyFunction() ||
|
||||
// Don't spill high register if the function is thumb
|
||||
if (!AFI->isThumbFunction() ||
|
||||
isARMLowRegister(Reg) || Reg == ARM::LR) {
|
||||
MRI.setPhysRegUsed(Reg);
|
||||
if (!MRI.isReserved(Reg))
|
||||
|
Reference in New Issue
Block a user