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

Nandini Singhal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 10:14:57 PDT 2017


nandini12396 updated this revision to Diff 108109.
nandini12396 added a comment.

Oh, I overlooked. Since we will be freeing the domain (take), we need a reference counted copy! Thank you.


https://reviews.llvm.org/D35691

Files:
  lib/Analysis/ScopInfo.cpp


Index: lib/Analysis/ScopInfo.cpp
===================================================================
--- lib/Analysis/ScopInfo.cpp
+++ lib/Analysis/ScopInfo.cpp
@@ -2263,10 +2263,10 @@
 
     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);
+    bool Valid = buildConditionSets(*this, BB, Val, TI, L, Dom,
+                                    InvalidDomainMap, ConditionSets);
     isl_set_free(Dom);
 
     if (!Valid)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35691.108109.patch
Type: text/x-patch
Size: 932 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170725/23f83b64/attachment.bin>


More information about the llvm-commits mailing list