diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-06-06 17:37:40 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-06-06 17:37:40 +0000 |
commit | a97b180fc44718e525bb03b50e05fe66622c2b02 (patch) | |
tree | d2cd642616a3a1edceaec34c3254354f1ed132c0 /lib/Target/X86/X86RegisterInfo.h | |
parent | 8b421c8eb2c41ee66cd1023bc7c262bdfaea481d (diff) | |
download | external_llvm-a97b180fc44718e525bb03b50e05fe66622c2b02.zip external_llvm-a97b180fc44718e525bb03b50e05fe66622c2b02.tar.gz external_llvm-a97b180fc44718e525bb03b50e05fe66622c2b02.tar.bz2 |
Add support for dynamic stack realignment in the presence of dynamic allocas on
X86.
rdar://11496434
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158087 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86RegisterInfo.h')
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/X86/X86RegisterInfo.h b/lib/Target/X86/X86RegisterInfo.h index ee69842..1bc32cb 100644 --- a/lib/Target/X86/X86RegisterInfo.h +++ b/lib/Target/X86/X86RegisterInfo.h @@ -50,6 +50,11 @@ private: /// unsigned FramePtr; + /// BasePtr - X86 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; + public: X86RegisterInfo(X86TargetMachine &tm, const TargetInstrInfo &tii); @@ -106,6 +111,8 @@ public: /// register scavenger to determine what registers are free. BitVector getReservedRegs(const MachineFunction &MF) const; + bool hasBasePointer(const MachineFunction &MF) const; + bool canRealignStack(const MachineFunction &MF) const; bool needsStackRealignment(const MachineFunction &MF) const; @@ -123,6 +130,7 @@ public: // Debug information queries. unsigned getFrameRegister(const MachineFunction &MF) const; unsigned getStackRegister() const { return StackPtr; } + unsigned getBaseRegister() const { return BasePtr; } // FIXME: Move to FrameInfok unsigned getSlotSize() const { return SlotSize; } |