summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-09-03 18:37:12 +0000
committerJim Grosbach <grosbach@apple.com>2010-09-03 18:37:12 +0000
commit03f4be86ba780e890a974da7cd5511491c3e6eac (patch)
treee3739ffa36552d37addfc0bdb41540b14adb484e /llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
parent662fecd65434ef39122e1908849e29c9e2be8027 (diff)
downloadbcm5719-llvm-03f4be86ba780e890a974da7cd5511491c3e6eac.tar.gz
bcm5719-llvm-03f4be86ba780e890a974da7cd5511491c3e6eac.zip
Re-apply r112883:
"For ARM stack frames that utilize variable sized objects and have either large local stack areas or require dynamic stack realignment, allocate a base register via which to access the local frame. This allows efficient access to frame indices not accessible via the FP (either due to being out of range or due to dynamic realignment) or the SP (due to variable sized object allocation). In particular, this greatly improves efficiency of access to spill slots in Thumb functions which contain VLAs." r112986 fixed a latent bug exposed by the above. llvm-svn: 112989
Diffstat (limited to 'llvm/lib/Target/ARM/ARMBaseRegisterInfo.h')
-rw-r--r--llvm/lib/Target/ARM/ARMBaseRegisterInfo.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
index c814f998d5b..fa2eb6c1049 100644
--- a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
+++ b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
@@ -52,6 +52,11 @@ protected:
/// FramePtr - ARM physical register used as frame ptr.
unsigned FramePtr;
+ /// BasePtr - ARM physical register used as a base ptr in complex stack
+ /// frames. I.e., when we need a 3rd base, not just SP and FP, due to
+ /// variable size stack objects.
+ unsigned BasePtr;
+
// Can be only subclassed.
explicit ARMBaseRegisterInfo(const ARMBaseInstrInfo &tii,
const ARMSubtarget &STI);
@@ -102,6 +107,7 @@ public:
MachineFunction &MF) const;
bool hasFP(const MachineFunction &MF) const;
+ bool hasBasePointer(const MachineFunction &MF) const;
bool canRealignStack(const MachineFunction &MF) const;
bool needsStackRealignment(const MachineFunction &MF) const;
OpenPOWER on IntegriCloud