[llvm] r267635 - Add optimization bisect opt-in calls for NVPTX passes

Andrew Kaylor via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 16:44:32 PDT 2016


Author: akaylor
Date: Tue Apr 26 18:44:31 2016
New Revision: 267635

URL: http://llvm.org/viewvc/llvm-project?rev=267635&view=rev
Log:
Add optimization bisect opt-in calls for NVPTX passes

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


Modified:
    llvm/trunk/lib/Target/NVPTX/NVPTXFavorNonGenericAddrSpaces.cpp
    llvm/trunk/lib/Target/NVPTX/NVPTXImageOptimizer.cpp
    llvm/trunk/lib/Target/NVPTX/NVPTXInferAddressSpaces.cpp
    llvm/trunk/lib/Target/NVPTX/NVPTXLowerAlloca.cpp
    llvm/trunk/lib/Target/NVPTX/NVPTXPeephole.cpp

Modified: llvm/trunk/lib/Target/NVPTX/NVPTXFavorNonGenericAddrSpaces.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXFavorNonGenericAddrSpaces.cpp?rev=267635&r1=267634&r2=267635&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXFavorNonGenericAddrSpaces.cpp (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXFavorNonGenericAddrSpaces.cpp Tue Apr 26 18:44:31 2016
@@ -266,7 +266,7 @@ bool NVPTXFavorNonGenericAddrSpaces::opt
 }
 
 bool NVPTXFavorNonGenericAddrSpaces::runOnFunction(Function &F) {
-  if (DisableFavorNonGeneric)
+  if (DisableFavorNonGeneric || skipFunction(F))
     return false;
 
   bool Changed = false;

Modified: llvm/trunk/lib/Target/NVPTX/NVPTXImageOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXImageOptimizer.cpp?rev=267635&r1=267634&r2=267635&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXImageOptimizer.cpp (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXImageOptimizer.cpp Tue Apr 26 18:44:31 2016
@@ -50,6 +50,9 @@ NVPTXImageOptimizer::NVPTXImageOptimizer
   : FunctionPass(ID) {}
 
 bool NVPTXImageOptimizer::runOnFunction(Function &F) {
+  if (skipFunction(F))
+    return false;
+
   bool Changed = false;
   InstrToDelete.clear();
 

Modified: llvm/trunk/lib/Target/NVPTX/NVPTXInferAddressSpaces.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXInferAddressSpaces.cpp?rev=267635&r1=267634&r2=267635&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXInferAddressSpaces.cpp (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXInferAddressSpaces.cpp Tue Apr 26 18:44:31 2016
@@ -419,6 +419,9 @@ static unsigned joinAddressSpaces(unsign
 }
 
 bool NVPTXInferAddressSpaces::runOnFunction(Function &F) {
+  if (skipFunction(F))
+    return false;
+
   // Collects all generic address expressions in postorder.
   std::vector<Value *> Postorder = collectGenericAddressExpressions(F);
 

Modified: llvm/trunk/lib/Target/NVPTX/NVPTXLowerAlloca.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXLowerAlloca.cpp?rev=267635&r1=267634&r2=267635&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXLowerAlloca.cpp (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXLowerAlloca.cpp Tue Apr 26 18:44:31 2016
@@ -62,6 +62,9 @@ INITIALIZE_PASS(NVPTXLowerAlloca, "nvptx
 // Main function for this pass.
 // =============================================================================
 bool NVPTXLowerAlloca::runOnBasicBlock(BasicBlock &BB) {
+  if (skipBasicBlock(BB))
+    return false;
+
   bool Changed = false;
   for (auto &I : BB) {
     if (auto allocaInst = dyn_cast<AllocaInst>(&I)) {

Modified: llvm/trunk/lib/Target/NVPTX/NVPTXPeephole.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXPeephole.cpp?rev=267635&r1=267634&r2=267635&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXPeephole.cpp (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXPeephole.cpp Tue Apr 26 18:44:31 2016
@@ -125,6 +125,9 @@ static void CombineCVTAToLocal(MachineIn
 }
 
 bool NVPTXPeephole::runOnMachineFunction(MachineFunction &MF) {
+  if (skipFunction(*MF.getFunction()))
+    return false;
+
   bool Changed = false;
   // Loop over all of the basic blocks.
   for (auto &MBB : MF) {




More information about the llvm-commits mailing list