[llvm-commits] [llvm] r83023 - /llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp
Jim Grosbach
grosbach at apple.com
Mon Sep 28 15:08:06 PDT 2009
Author: grosbach
Date: Mon Sep 28 17:08:06 2009
New Revision: 83023
URL: http://llvm.org/viewvc/llvm-project?rev=83023&view=rev
Log:
Adjust processFunctionBeforeCalleeSavedScan() to correctly reserve a stack
slot for the register scavenger when compiling Thumb1 functions.
Modified:
llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp?rev=83023&r1=83022&r2=83023&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Mon Sep 28 17:08:06 2009
@@ -536,7 +536,8 @@
}
}
- if (CSRegClasses[i] == ARM::GPRRegisterClass) {
+ if (CSRegClasses[i] == ARM::GPRRegisterClass ||
+ CSRegClasses[i] == ARM::tGPRRegisterClass) {
if (Spilled) {
NumGPRSpills++;
@@ -667,7 +668,8 @@
NumExtras--;
}
}
- while (NumExtras && !UnspilledCS2GPRs.empty()) {
+ while (NumExtras && !UnspilledCS2GPRs.empty() &&
+ !AFI->isThumb1OnlyFunction()) {
unsigned Reg = UnspilledCS2GPRs.back();
UnspilledCS2GPRs.pop_back();
if (!isReservedReg(MF, Reg)) {
More information about the llvm-commits
mailing list