[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 05:07:21 PDT 2017


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

@Meinersbur : I got the basic block of the call instruction, if it belongs to the scop and the region's entry block if not. Im really not sure what is the reason of the failure of these 5 tests.

@grosser : Sorry for the long delay here. The server has to be manually reset after the slightest power fluctuation.


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].get() : 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.108053.patch
Type: text/x-patch
Size: 931 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170725/30a17a43/attachment.bin>


More information about the llvm-commits mailing list