summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Friedman <efriedma@codeaurora.org>2017-06-01 21:29:05 +0000
committerEli Friedman <efriedma@codeaurora.org>2017-06-01 21:29:05 +0000
commitde1b318dad331cb07d55d232543bb61ae67ce210 (patch)
tree9a1559b596afe81d0106d32a394629f14544966c
parent387ab8b6da9e3453f427258e159895b67e3fde6a (diff)
downloadbcm5719-llvm-de1b318dad331cb07d55d232543bb61ae67ce210.tar.gz
bcm5719-llvm-de1b318dad331cb07d55d232543bb61ae67ce210.zip
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 llvm-svn: 304480
-rw-r--r--polly/lib/Analysis/ScopPass.cpp3
-rw-r--r--polly/lib/Transform/CodePreparation.cpp5
2 files changed, 7 insertions, 1 deletions
diff --git a/polly/lib/Analysis/ScopPass.cpp b/polly/lib/Analysis/ScopPass.cpp
index b385f682e4e..dfdf31396d9 100644
--- a/polly/lib/Analysis/ScopPass.cpp
+++ b/polly/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<ScopInfoRegionPass>().getScop()))
return runOnScop(*S);
diff --git a/polly/lib/Transform/CodePreparation.cpp b/polly/lib/Transform/CodePreparation.cpp
index 2f74395ea20..081244da810 100644
--- a/polly/lib/Transform/CodePreparation.cpp
+++ b/polly/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<LoopInfoWrapperPass>().getLoopInfo();
SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE();
splitEntryBlockForAlloca(&F.getEntryBlock(), this);
- return false;
+ return true;
}
void CodePreparation::releaseMemory() { clear(); }
OpenPOWER on IntegriCloud