diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-09-02 22:29:01 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-09-02 22:29:01 +0000 |
commit | 1755b3964f931bdd6fa9b4c0138f666ccfa12aca (patch) | |
tree | da44cb7a52f81004cbdf4663047b5e49f6375afe /lib/Target/ARM/ARMBaseRegisterInfo.h | |
parent | bc54ee9a77b496ba1d8dbbfc6bacd9b20066b31e (diff) | |
download | external_llvm-1755b3964f931bdd6fa9b4c0138f666ccfa12aca.zip external_llvm-1755b3964f931bdd6fa9b4c0138f666ccfa12aca.tar.gz external_llvm-1755b3964f931bdd6fa9b4c0138f666ccfa12aca.tar.bz2 |
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.
rdar://7352504
rdar://8374540
rdar://8355680
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112883 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMBaseRegisterInfo.h')
-rw-r--r-- | lib/Target/ARM/ARMBaseRegisterInfo.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMBaseRegisterInfo.h b/lib/Target/ARM/ARMBaseRegisterInfo.h index c814f99..fa2eb6c 100644 --- a/lib/Target/ARM/ARMBaseRegisterInfo.h +++ b/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; |