[PATCH] D35691: [Polly] [ScopInfo] Avoid use of getStmtFor(BB). NFC.

Nandini Singhal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 10:49:16 PDT 2017


nandini12396 created this revision.
nandini12396 added a project: Polly.
Herald added a reviewer: bollu.

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.


https://reviews.llvm.org/D35691

Files:
  lib/Analysis/ScopInfo.cpp


Index: lib/Analysis/ScopInfo.cpp
===================================================================
--- lib/Analysis/ScopInfo.cpp
+++ lib/Analysis/ScopInfo.cpp
@@ -2262,7 +2262,7 @@
 
     SmallVector<isl_set *, 2> ConditionSets;
     auto *TI = InScop ? CI->getParent()->getTerminator() : nullptr;
-    auto &Stmt = InScop ? *getStmtFor(CI->getParent()) : *Stmts.begin();
+    auto &Stmt = InScop ? *getStmtFor(CI) : *Stmts.begin();
     auto *Dom = InScop ? getDomainConditions(&Stmt) : isl_set_copy(Context);
     bool Valid = buildConditionSets(*this, Stmt.getEntryBlock(), Val, TI, L,
                                     Dom, InvalidDomainMap, ConditionSets);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35691.107553.patch
Type: text/x-patch
Size: 667 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170720/ccd7ab1f/attachment.bin>


More information about the llvm-commits mailing list