diff options
author | Michael Kruse <llvm@meinersbur.de> | 2017-07-26 13:25:28 +0000 |
---|---|---|
committer | Michael Kruse <llvm@meinersbur.de> | 2017-07-26 13:25:28 +0000 |
commit | 1df1aac0147fdcf844e8f8e8a4fbc36ad3216756 (patch) | |
tree | 314eb720145214825053a643f3f89297e9799171 | |
parent | 11ed0622583deada30e6a992df2586de0736fa86 (diff) | |
download | bcm5719-llvm-1df1aac0147fdcf844e8f8e8a4fbc36ad3216756.tar.gz bcm5719-llvm-1df1aac0147fdcf844e8f8e8a4fbc36ad3216756.zip |
[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@iith.ac.in>
Differential Revision: https://reviews.llvm.org/D35691
llvm-svn: 309110
-rw-r--r-- | polly/lib/Analysis/ScopInfo.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 7eff057d6bf..0d6573ea499 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -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) |