From 535de035717cc676a4c76e0cd06917e71417dfa1 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Tue, 19 Apr 2016 14:49:05 +0000 Subject: [PATCH] Do not build domains for out of SCoP blocks [NFC] llvm-svn: 266739 --- polly/lib/Analysis/ScopInfo.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index f2ebce88dc66..d1ec2be6c2da 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -2489,6 +2489,13 @@ bool Scop::buildDomainsWithBranchConstraints(Region *R, ScopDetection &SD, isl_set *CondSet = ConditionSets[u]; BasicBlock *SuccBB = getRegionNodeSuccessor(RN, TI, u); + auto *SuccStmt = getStmtFor(SuccBB); + // Skip blocks outside the region. + if (!SuccStmt) { + isl_set_free(CondSet); + continue; + } + // If we propagate the domain of some block to "SuccBB" we do not have to // adjust the domain. if (FinishedExitBlocks.count(SuccBB)) {