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

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 01:57:07 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(
----------------
david-arm wrote:

Good point and thanks for reminding me!

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


More information about the llvm-commits mailing list