[polly] r304480 - Add opt-bisect support to polly.

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 14:29:05 PDT 2017


Author: efriedma
Date: Thu Jun  1 16:29:05 2017
New Revision: 304480

URL: http://llvm.org/viewvc/llvm-project?rev=304480&view=rev
Log:
Add opt-bisect support to polly.

This is useful for debugging miscompiles and extracting testcases
for crashes. See http://llvm.org/docs/OptBisect.html .

Differential Revision: https://reviews.llvm.org/D33752


Modified:
    polly/trunk/lib/Analysis/ScopPass.cpp
    polly/trunk/lib/Transform/CodePreparation.cpp

Modified: polly/trunk/lib/Analysis/ScopPass.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopPass.cpp?rev=304480&r1=304479&r2=304480&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopPass.cpp (original)
+++ polly/trunk/lib/Analysis/ScopPass.cpp Thu Jun  1 16:29:05 2017
@@ -22,6 +22,9 @@ using namespace polly;
 bool ScopPass::runOnRegion(Region *R, RGPassManager &RGM) {
   S = nullptr;
 
+  if (skipRegion(*R))
+    return false;
+
   if ((S = getAnalysis<ScopInfoRegionPass>().getScop()))
     return runOnScop(*S);
 

Modified: polly/trunk/lib/Transform/CodePreparation.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/CodePreparation.cpp?rev=304480&r1=304479&r2=304480&view=diff
==============================================================================
--- polly/trunk/lib/Transform/CodePreparation.cpp (original)
+++ polly/trunk/lib/Transform/CodePreparation.cpp Thu Jun  1 16:29:05 2017
@@ -72,12 +72,15 @@ void CodePreparation::getAnalysisUsage(A
 }
 
 bool CodePreparation::runOnFunction(Function &F) {
+  if (skipFunction(F))
+    return false;
+
   LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
   SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE();
 
   splitEntryBlockForAlloca(&F.getEntryBlock(), this);
 
-  return false;
+  return true;
 }
 
 void CodePreparation::releaseMemory() { clear(); }




More information about the llvm-commits mailing list