[polly] r309110 - [ScopInfo] Avoid use of getStmtFor(BB). NFC.
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 26 06:25:28 PDT 2017
Author: meinersbur
Date: Wed Jul 26 06:25:28 2017
New Revision: 309110
URL: http://llvm.org/viewvc/llvm-project?rev=309110&view=rev
Log:
[ScopInfo] Avoid use of getStmtFor(BB). NFC.
Since there will be no more a 1:1 correspondence between statements and
basic blocks, we would like to get rid of the method getStmtFor(BB)
and its uses. Here we remove one of its uses in ScopInfo by fetching
the statement in which the call instruction lies.
Contributed-by: Nandini Singhal <cs15mtech01004 at iith.ac.in>
Differential Revision: https://reviews.llvm.org/D35691
Modified:
polly/trunk/lib/Analysis/ScopInfo.cpp
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=309110&r1=309109&r2=309110&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Wed Jul 26 06:25:28 2017
@@ -2263,10 +2263,11 @@ void Scop::addUserAssumptions(
SmallVector<isl_set *, 2> ConditionSets;
auto *TI = InScop ? CI->getParent()->getTerminator() : nullptr;
- auto &Stmt = InScop ? *getStmtFor(CI->getParent()) : *Stmts.begin();
- auto *Dom = InScop ? getDomainConditions(&Stmt) : isl_set_copy(Context);
- bool Valid = buildConditionSets(*this, Stmt.getEntryBlock(), Val, TI, L,
- Dom, InvalidDomainMap, ConditionSets);
+ BasicBlock *BB = InScop ? CI->getParent() : getRegion().getEntry();
+ auto *Dom = InScop ? DomainMap[BB].copy() : isl_set_copy(Context);
+ assert(Dom && "Cannot propagate a nullptr.");
+ bool Valid = buildConditionSets(*this, BB, Val, TI, L, Dom,
+ InvalidDomainMap, ConditionSets);
isl_set_free(Dom);
if (!Valid)
More information about the llvm-commits
mailing list