summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86FrameLowering.cpp
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2015-12-09 23:08:18 +0000
committerQuentin Colombet <qcolombet@apple.com>2015-12-09 23:08:18 +0000
commit5d2f7cfd44db983c5c21d36356c3319d792a90bc (patch)
tree516d6364e8b823dcfa6d9c7915a950cae0c2f0cf /llvm/lib/Target/X86/X86FrameLowering.cpp
parent429183e7c8b93e8fcbad7741f87fc25d1cb94d51 (diff)
downloadbcm5719-llvm-5d2f7cfd44db983c5c21d36356c3319d792a90bc.tar.gz
bcm5719-llvm-5d2f7cfd44db983c5c21d36356c3319d792a90bc.zip
[X86] Enable shrink-wrapping by default, but keep it disabled for stack frames
without a frame pointer when unwind may happen. This is a workaround for a bug in the way we emit the CFI directives for frameless unwind information. See PR25614. llvm-svn: 255175
Diffstat (limited to 'llvm/lib/Target/X86/X86FrameLowering.cpp')
-rw-r--r--llvm/lib/Target/X86/X86FrameLowering.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp
index 2e7ed58e340..8695a0e2967 100644
--- a/llvm/lib/Target/X86/X86FrameLowering.cpp
+++ b/llvm/lib/Target/X86/X86FrameLowering.cpp
@@ -2595,6 +2595,12 @@ bool X86FrameLowering::canUseAsEpilogue(const MachineBasicBlock &MBB) const {
return !flagsNeedToBePreservedBeforeTheTerminators(MBB);
}
+bool X86FrameLowering::enableShrinkWrapping(const MachineFunction &MF) const {
+ // If we may need to emit frameless compact unwind information, give
+ // up as this is currently broken: PR25614.
+ return MF.getFunction()->hasFnAttribute(Attribute::NoUnwind) || hasFP(MF);
+}
+
MachineBasicBlock::iterator X86FrameLowering::restoreWin32EHStackPointers(
MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
DebugLoc DL, bool RestoreSP) const {
OpenPOWER on IntegriCloud