[PATCH] D12905: [SCEV][LV] Introduce SCEV Predicates and use them to re-implement stride versioning

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 16:32:52 PDT 2015


hfinkel added inline comments.

================
Comment at: include/llvm/Analysis/ScalarEvolution.h:244
@@ +243,3 @@
+    /// Storage for different predicates that make up this Predicate Set.
+    //SmallVector<SCEVAddRecOverflowPredicate, 16> AddRecOverflows;
+    SmallVector<SCEVEqualPredicate, 16> IdPreds;
----------------
Remove commented-out code.


================
Comment at: lib/Analysis/ScalarEvolution.cpp:9157
@@ +9156,3 @@
+
+void SCEVPredicateSet::add(const SCEVPredicate *N) {
+  if (Preds.size() > SCEVCheckThreshold || N->isAlwaysFalse()) {
----------------
Can this take a threshold override, or similar, as a parameter to override SCEVCheckThreshold? We had specifically decided that loops decorated with #pragma clang vectorize(enable), which asks for vectorization but does not assert safety, would generate as many checks as necessary to enable vectorization (or be bound by some very large limit). For this case, we'll need to override the limit (or, at least, have a much larger limit). Generically, I'm skeptical of embedding the limit in SCEV at all; I think that the caller should always provide an appropriate limit for whatever happens to be its use case.



http://reviews.llvm.org/D12905





More information about the llvm-commits mailing list