[PATCH] D19450: Add optimization bisect opt-in calls for AMDGPU passes

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 15:29:40 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL267485: Add optimization bisect opt-in calls for AMDGPU passes (authored by akaylor).

Changed prior to commit:
  http://reviews.llvm.org/D19450?vs=54756&id=54931#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19450

Files:
  llvm/trunk/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
  llvm/trunk/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
  llvm/trunk/lib/Target/AMDGPU/R600ClauseMergePass.cpp
  llvm/trunk/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp
  llvm/trunk/lib/Target/AMDGPU/SIFoldOperands.cpp
  llvm/trunk/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
  llvm/trunk/lib/Target/AMDGPU/SIShrinkInstructions.cpp

Index: llvm/trunk/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
@@ -97,7 +97,7 @@
 }
 
 bool AMDGPUPromoteAlloca::runOnFunction(Function &F) {
-  if (!TM || F.hasFnAttribute(Attribute::OptimizeNone))
+  if (!TM || skipFunction(F))
     return false;
 
   FunctionType *FTy = F.getFunctionType();
Index: llvm/trunk/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
+++ llvm/trunk/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
@@ -423,6 +423,9 @@
 }
 
 bool SILoadStoreOptimizer::runOnMachineFunction(MachineFunction &MF) {
+  if (skipFunction(*MF.getFunction()))
+    return false;
+
   const TargetSubtargetInfo &STM = MF.getSubtarget();
   TRI = static_cast<const SIRegisterInfo *>(STM.getRegisterInfo());
   TII = static_cast<const SIInstrInfo *>(STM.getInstrInfo());
Index: llvm/trunk/lib/Target/AMDGPU/SIFoldOperands.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIFoldOperands.cpp
+++ llvm/trunk/lib/Target/AMDGPU/SIFoldOperands.cpp
@@ -295,6 +295,9 @@
 }
 
 bool SIFoldOperands::runOnMachineFunction(MachineFunction &MF) {
+  if (skipFunction(*MF.getFunction()))
+    return false;
+
   MachineRegisterInfo &MRI = MF.getRegInfo();
   const SIInstrInfo *TII =
       static_cast<const SIInstrInfo *>(MF.getSubtarget().getInstrInfo());
Index: llvm/trunk/lib/Target/AMDGPU/R600ClauseMergePass.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/R600ClauseMergePass.cpp
+++ llvm/trunk/lib/Target/AMDGPU/R600ClauseMergePass.cpp
@@ -168,6 +168,9 @@
 }
 
 bool R600ClauseMergePass::runOnMachineFunction(MachineFunction &MF) {
+  if (skipFunction(*MF.getFunction()))
+    return false;
+
   TII = static_cast<const R600InstrInfo *>(MF.getSubtarget().getInstrInfo());
   for (MachineFunction::iterator BB = MF.begin(), BB_E = MF.end();
                                                   BB != BB_E; ++BB) {
Index: llvm/trunk/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
@@ -88,6 +88,9 @@
 }
 
 bool AMDGPUAnnotateUniformValues::runOnFunction(Function &F) {
+  if (skipFunction(F))
+    return false;
+
   DA = &getAnalysis<DivergenceAnalysis>();
   visit(F);
 
Index: llvm/trunk/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp
+++ llvm/trunk/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp
@@ -314,6 +314,9 @@
 }
 
 bool R600VectorRegMerger::runOnMachineFunction(MachineFunction &Fn) {
+  if (skipFunction(*Fn.getFunction()))
+    return false;
+
   TII = static_cast<const R600InstrInfo *>(Fn.getSubtarget().getInstrInfo());
   MRI = &(Fn.getRegInfo());
   for (MachineFunction::iterator MBB = Fn.begin(), MBBe = Fn.end();
Index: llvm/trunk/lib/Target/AMDGPU/SIShrinkInstructions.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIShrinkInstructions.cpp
+++ llvm/trunk/lib/Target/AMDGPU/SIShrinkInstructions.cpp
@@ -203,6 +203,9 @@
 }
 
 bool SIShrinkInstructions::runOnMachineFunction(MachineFunction &MF) {
+  if (skipFunction(*MF.getFunction()))
+    return false;
+
   MachineRegisterInfo &MRI = MF.getRegInfo();
   const SIInstrInfo *TII =
       static_cast<const SIInstrInfo *>(MF.getSubtarget().getInstrInfo());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19450.54931.patch
Type: text/x-patch
Size: 3820 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160425/18e85ea6/attachment.bin>


More information about the llvm-commits mailing list