summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86FrameLowering.h
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-06-18 18:03:25 +0000
committerReid Kleckner <reid@kleckner.net>2015-06-18 18:03:25 +0000
commit3854f7bc2710c38a308614635725b2d65524ab55 (patch)
tree5ca58c2191a2df1966d8ff3c715f86e0dbaf90f1 /llvm/lib/Target/X86/X86FrameLowering.h
parentf5c81322910905e2a9d5c99d74f9b202182d1c3f (diff)
downloadbcm5719-llvm-3854f7bc2710c38a308614635725b2d65524ab55.tar.gz
bcm5719-llvm-3854f7bc2710c38a308614635725b2d65524ab55.zip
[X86] Remove unneeded parameters and deduplicate stack alignment code
NFC llvm-svn: 240033
Diffstat (limited to 'llvm/lib/Target/X86/X86FrameLowering.h')
-rw-r--r--llvm/lib/Target/X86/X86FrameLowering.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/llvm/lib/Target/X86/X86FrameLowering.h b/llvm/lib/Target/X86/X86FrameLowering.h
index 38d21e8eccf..13c4c31d93c 100644
--- a/llvm/lib/Target/X86/X86FrameLowering.h
+++ b/llvm/lib/Target/X86/X86FrameLowering.h
@@ -18,6 +18,7 @@
namespace llvm {
+class MCCFIInstruction;
class X86Subtarget;
class X86RegisterInfo;
@@ -43,6 +44,8 @@ public:
/// instruction operands should be used to manipulate StackPtr and FramePtr.
bool Uses64BitFramePtr;
+ unsigned StackPtr;
+
/// Emit a call to the target's stack probe function. This is required for all
/// large stack allocations on Windows. The caller is required to materialize
/// the number of bytes to probe in RAX/EAX.
@@ -104,15 +107,12 @@ public:
/// stack adjustment is returned as a positive value for ADD/LEA and
/// a negative for SUB.
int mergeSPUpdates(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI,
- unsigned StackPtr, bool doMergeWithPrevious) const;
+ bool doMergeWithPrevious) const;
/// Emit a series of instructions to increment / decrement the stack
/// pointer by a constant value.
void emitSPUpdate(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI,
- unsigned StackPtr, int64_t NumBytes, bool Is64BitTarget,
- bool Is64BitStackPtr, bool UseLEA,
- const TargetInstrInfo &TII,
- const TargetRegisterInfo &TRI) const;
+ int64_t NumBytes, bool UseLEA) const;
/// Check that LEA can be used on SP in an epilogue sequence for \p MF.
bool canUseLEAForSPInEpilogue(const MachineFunction &MF) const;
@@ -135,6 +135,15 @@ private:
uint64_t Amount) const;
uint64_t calculateMaxStackAlign(const MachineFunction &MF) const;
+
+ /// Wraps up getting a CFI index and building a MachineInstr for it.
+ void BuildCFI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
+ DebugLoc DL, MCCFIInstruction CFIInst) const;
+
+ /// Aligns the stack pointer by ANDing it with -MaxAlign.
+ void BuildStackAlignAND(MachineBasicBlock &MBB,
+ MachineBasicBlock::iterator MBBI, DebugLoc DL,
+ uint64_t MaxAlign) const;
};
} // End llvm namespace
OpenPOWER on IntegriCloud