[PATCH] D19439: Optimization bisect support in X86-specific passes

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 14:50:13 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL267608: Optimization bisect support in X86-specific passes (authored by akaylor).

Changed prior to commit:
  http://reviews.llvm.org/D19439?vs=55039&id=55098#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19439

Files:
  llvm/trunk/lib/Target/X86/X86FixupBWInsts.cpp
  llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp
  llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
  llvm/trunk/lib/Target/X86/X86OptimizeLEAs.cpp
  llvm/trunk/lib/Target/X86/X86PadShortFunction.cpp

Index: llvm/trunk/lib/Target/X86/X86OptimizeLEAs.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86OptimizeLEAs.cpp
+++ llvm/trunk/lib/Target/X86/X86OptimizeLEAs.cpp
@@ -616,7 +616,8 @@
   bool Changed = false;
 
   // Perform this optimization only if we care about code size.
-  if (DisableX86LEAOpt || !MF.getFunction()->optForSize())
+  if (DisableX86LEAOpt || skipFunction(*MF.getFunction()) ||
+      !MF.getFunction()->optForSize())
     return false;
 
   MRI = &MF.getRegInfo();
Index: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
@@ -7377,7 +7377,10 @@
     LDTLSCleanup() : MachineFunctionPass(ID) {}
 
     bool runOnMachineFunction(MachineFunction &MF) override {
-      X86MachineFunctionInfo* MFI = MF.getInfo<X86MachineFunctionInfo>();
+      if (skipFunction(*MF.getFunction()))
+        return false;
+
+      X86MachineFunctionInfo *MFI = MF.getInfo<X86MachineFunctionInfo>();
       if (MFI->getNumLocalDynamicTLSAccesses() < 2) {
         // No point folding accesses if there isn't at least two.
         return false;
Index: llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp
+++ llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp
@@ -162,6 +162,9 @@
 FunctionPass *llvm::createX86FixupLEAs() { return new FixupLEAPass(); }
 
 bool FixupLEAPass::runOnMachineFunction(MachineFunction &Func) {
+  if (skipFunction(*Func.getFunction()))
+    return false;
+
   MF = &Func;
   const X86Subtarget &ST = Func.getSubtarget<X86Subtarget>();
   OptIncDec = !ST.slowIncDec() || Func.getFunction()->optForMinSize();
Index: llvm/trunk/lib/Target/X86/X86FixupBWInsts.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86FixupBWInsts.cpp
+++ llvm/trunk/lib/Target/X86/X86FixupBWInsts.cpp
@@ -138,7 +138,7 @@
 FunctionPass *llvm::createX86FixupBWInsts() { return new FixupBWInstPass(); }
 
 bool FixupBWInstPass::runOnMachineFunction(MachineFunction &MF) {
-  if (!FixupBWInsts)
+  if (!FixupBWInsts || skipFunction(*MF.getFunction()))
     return false;
 
   this->MF = &MF;
Index: llvm/trunk/lib/Target/X86/X86PadShortFunction.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86PadShortFunction.cpp
+++ llvm/trunk/lib/Target/X86/X86PadShortFunction.cpp
@@ -98,6 +98,9 @@
 /// runOnMachineFunction - Loop over all of the basic blocks, inserting
 /// NOOP instructions before early exits.
 bool PadShortFunc::runOnMachineFunction(MachineFunction &MF) {
+  if (skipFunction(*MF.getFunction()))
+    return false;
+
   if (MF.getFunction()->optForSize()) {
     return false;
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19439.55098.patch
Type: text/x-patch
Size: 2907 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160426/6d15f6c1/attachment.bin>


More information about the llvm-commits mailing list