[llvm] [Analysis] Teach isDereferenceableAndAlignedInLoop about SCEV predicates (PR #106562)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 09:05:59 PDT 2024


================
@@ -898,6 +901,13 @@ class ScalarEvolution {
     return getBackedgeTakenCount(L, ConstantMaximum);
   }
 
+  /// Similar to getConstantMaxBackedgeTakenCount, except it will add a set of
+  /// SCEV predicates to Predicates that are required to be true in order for
+  /// the answer to be correct. Predicates can be checked with run-time
+  /// checks and can be used to perform loop versioning.
+  const SCEV *getPredicatedConstantMaxBackedgeTakenCount(
----------------
fhahn wrote:

Should those also be included in SCEV printing? Maybe it already is, and maybe just a SCEV test is missing?

https://github.com/llvm/llvm-project/pull/106562


More information about the llvm-commits mailing list