[X86] Enable shrink-wrapping by default.
authorQuentin Colombet <qcolombet@apple.com>
Thu, 19 Nov 2015 00:38:00 +0000 (00:38 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Thu, 19 Nov 2015 00:38:00 +0000 (00:38 +0000)
Differential Revision: http://reviews.llvm.org/D14156

rdar://problem/21118279

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253528 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86FrameLowering.h
test/CodeGen/X86/tail-opts.ll

index 68dc8edfd4309b660156097dec3674a55cc1a242..d90a3935b3fa473158e53c8466fbdf13ff3fd67e 100644 (file)
@@ -143,6 +143,11 @@ public:
                               MachineBasicBlock::iterator I, 
                               uint64_t Amount) const;
 
+  /// Returns true if the target will correctly handle shrink wrapping.
+  bool enableShrinkWrapping(const MachineFunction &MF) const override {
+    return true;
+  }
+
   /// Wraps up getting a CFI index and building a MachineInstr for it.
   void BuildCFI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
                 DebugLoc DL, MCCFIInstruction CFIInst) const;
index c522ba60d6bf6d411490a5b0fc2a4541208f13e2..bf778e5bad2ba5d25dba1389729db50bf44c9892 100644 (file)
@@ -277,8 +277,8 @@ declare fastcc %union.tree_node* @default_conversion(%union.tree_node*) nounwind
 
 ; CHECK-LABEL: foo:
 ; CHECK:        callq func
-; CHECK-NEXT: .LBB4_2:
 ; CHECK-NEXT:   popq
+; CHECK-NEXT: .LBB4_2:
 ; CHECK-NEXT:   ret
 
 define void @foo(i1* %V) nounwind {