summaryrefslogtreecommitdiffstats
path: root/polly/lib/Analysis
diff options
context:
space:
mode:
authorJohannes Doerfert <doerfert@cs.uni-saarland.de>2015-09-28 01:30:37 +0000
committerJohannes Doerfert <doerfert@cs.uni-saarland.de>2015-09-28 01:30:37 +0000
commitf32f5f23052439dbb123b678ed5b811394d7937e (patch)
tree11dae33a0a058a5b2d11f59ed85d126b32814730 /polly/lib/Analysis
parent91ad092bb2268cef887156e6ceaca8d552b7a4f6 (diff)
downloadbcm5719-llvm-f32f5f23052439dbb123b678ed5b811394d7937e.tar.gz
bcm5719-llvm-f32f5f23052439dbb123b678ed5b811394d7937e.zip
Remove obsolete check
This check was needed at some point but seems not useful anymore. Only one adjustment in the domain generation was needed to cope with the cases this check prevented from happening before. llvm-svn: 248695
Diffstat (limited to 'polly/lib/Analysis')
-rw-r--r--polly/lib/Analysis/ScopDetection.cpp14
-rw-r--r--polly/lib/Analysis/ScopDetectionDiagnostic.cpp21
-rw-r--r--polly/lib/Analysis/ScopInfo.cpp2
3 files changed, 3 insertions, 34 deletions
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp
index 8a41891b1a4..5d779a40f27 100644
--- a/polly/lib/Analysis/ScopDetection.cpp
+++ b/polly/lib/Analysis/ScopDetection.cpp
@@ -949,18 +949,8 @@ bool ScopDetection::isValidRegion(DetectionContext &Context) const {
BasicBlock *entry = CurRegion.getEntry();
Loop *L = LI->getLoopFor(entry);
- if (L) {
- if (!L->isLoopSimplifyForm())
- return invalid<ReportSimpleLoop>(Context, /*Assert=*/true);
-
- for (pred_iterator PI = pred_begin(entry), PE = pred_end(entry); PI != PE;
- ++PI) {
- // Region entering edges come from the same loop but outside the region
- // are not allowed.
- if (L->contains(*PI) && !CurRegion.contains(*PI))
- return invalid<ReportIndEdge>(Context, /*Assert=*/true, *PI);
- }
- }
+ if (L && !L->isLoopSimplifyForm())
+ return invalid<ReportSimpleLoop>(Context, /*Assert=*/true);
}
// SCoP cannot contain the entry block of the function, because we need
diff --git a/polly/lib/Analysis/ScopDetectionDiagnostic.cpp b/polly/lib/Analysis/ScopDetectionDiagnostic.cpp
index c7265bd26cf..f341f19adbd 100644
--- a/polly/lib/Analysis/ScopDetectionDiagnostic.cpp
+++ b/polly/lib/Analysis/ScopDetectionDiagnostic.cpp
@@ -40,7 +40,6 @@
STATISTIC(Bad##NAME##ForScop, "Number of bad regions for Scop: " DESC)
BADSCOP_STAT(CFG, "CFG too complex");
-BADSCOP_STAT(IndEdge, "Found invalid region entering edges");
BADSCOP_STAT(LoopBound, "Loop bounds can not be computed");
BADSCOP_STAT(FuncCall, "Function call with side effects appeared");
BADSCOP_STAT(AffFunc, "Expression not affine");
@@ -301,26 +300,6 @@ std::string ReportNonAffineAccess::getEndUserMessage() const {
}
//===----------------------------------------------------------------------===//
-// ReportIndEdge.
-
-ReportIndEdge::ReportIndEdge(BasicBlock *BB)
- : RejectReason(rrkIndEdge), BB(BB) {
- ++BadIndEdgeForScop;
-}
-
-std::string ReportIndEdge::getMessage() const {
- return "Region has invalid entering edges!";
-}
-
-const DebugLoc &ReportIndEdge::getDebugLoc() const {
- return BB->getTerminator()->getDebugLoc();
-}
-
-bool ReportIndEdge::classof(const RejectReason *RR) {
- return RR->getKind() == rrkIndEdge;
-}
-
-//===----------------------------------------------------------------------===//
// ReportLoopBound.
ReportLoopBound::ReportLoopBound(Loop *L, const SCEV *LoopCount)
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index d002b52fd73..5fb69943096 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -1861,7 +1861,7 @@ void Scop::propagateDomainConstraints(Region *R, LoopInfo &LI,
// Under the union of all predecessor conditions we can reach this block.
Domain = isl_set_coalesce(isl_set_intersect(Domain, PredDom));
- if (BBLoop && BBLoop->getHeader() == BB)
+ if (BBLoop && BBLoop->getHeader() == BB && getRegion().contains(BBLoop))
addLoopBoundsToHeaderDomain(BBLoop, LI);
// Add assumptions for error blocks.
OpenPOWER on IntegriCloud