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

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 11:38:54 PDT 2017


Meinersbur added inline comments.


================
Comment at: lib/Analysis/ScopInfo.cpp:2267
+    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,
----------------
We must ensure that `DomainMap[BB]` is a valid entry, it is possibly not assigned.

In particular, if `BB` is in the middle of a non-affine subregion, it could be empty.

I think those assumptions should be ignored. Can you add a bail-out for that (not call `buildConditionSets`/`continue`) or add an `assert()`?

(I think this wasn't handled correctly before anyway, so an assert would be fine)


https://reviews.llvm.org/D35691





More information about the llvm-commits mailing list