[llvm] r257187 - Disable shrink-wrap for Thumb1

Weiming Zhao via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 8 10:37:44 PST 2016


Author: weimingz
Date: Fri Jan  8 12:37:43 2016
New Revision: 257187

URL: http://llvm.org/viewvc/llvm-project?rev=257187&view=rev
Log:
Disable shrink-wrap for Thumb1

Summary: In ARMConstantIslandPass, which runs after Shrink Wrap pass, long jumps will be fixed up as BL (tBfar) which depends on spilling LR in epilogue.  However, shrink-wrap may remove the LR, which causes issues when the function returns.

Reviewers: qcolombet, rengolin

Subscribers: aemerson, rengolin

Differential Revision: http://reviews.llvm.org/D15984

Modified:
    llvm/trunk/lib/Target/ARM/Thumb1FrameLowering.h

Modified: llvm/trunk/lib/Target/ARM/Thumb1FrameLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Thumb1FrameLowering.h?rev=257187&r1=257186&r2=257187&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Thumb1FrameLowering.h (original)
+++ llvm/trunk/lib/Target/ARM/Thumb1FrameLowering.h Fri Jan  8 12:37:43 2016
@@ -53,6 +53,11 @@ public:
   /// \p MBB will be correctly handled by the target.
   bool canUseAsEpilogue(const MachineBasicBlock &MBB) const override;
 
+  /// Disable shrink wrap as tBfar/BL will be used to adjust for long jumps.
+  bool enableShrinkWrapping(const MachineFunction &MF) const override {
+    return false;
+  }
+
 private:
   /// Check if the frame lowering of \p MF needs a special fixup
   /// code sequence for the epilogue.




More information about the llvm-commits mailing list