From ca3c180793fba3364994d4769ef8d767532e6c9f Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 1 Jun 2017 21:29:05 +0000 Subject: [PATCH] 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 git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@304480 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/ScopPass.cpp | 3 +++ lib/Transform/CodePreparation.cpp | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/Analysis/ScopPass.cpp b/lib/Analysis/ScopPass.cpp index b385f682..dfdf3139 100644 --- a/lib/Analysis/ScopPass.cpp +++ b/lib/Analysis/ScopPass.cpp @@ -22,6 +22,9 @@ using namespace polly; bool ScopPass::runOnRegion(Region *R, RGPassManager &RGM) { S = nullptr; + if (skipRegion(*R)) + return false; + if ((S = getAnalysis().getScop())) return runOnScop(*S); diff --git a/lib/Transform/CodePreparation.cpp b/lib/Transform/CodePreparation.cpp index 2f74395e..081244da 100644 --- a/lib/Transform/CodePreparation.cpp +++ b/lib/Transform/CodePreparation.cpp @@ -72,12 +72,15 @@ void CodePreparation::getAnalysisUsage(AnalysisUsage &AU) const { } bool CodePreparation::runOnFunction(Function &F) { + if (skipFunction(F)) + return false; + LI = &getAnalysis().getLoopInfo(); SE = &getAnalysis().getSE(); splitEntryBlockForAlloca(&F.getEntryBlock(), this); - return false; + return true; } void CodePreparation::releaseMemory() { clear(); } -- 2.11.4.GIT