[llvm] [LoopVectorize] Add support for vectorisation of more early exit loops (PR #88385)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 23 23:39:04 PDT 2024


================
@@ -653,7 +659,24 @@ class LoopAccessInfo {
   bool isInvariant(Value *V) const;
 
   unsigned getNumStores() const { return NumStores; }
-  unsigned getNumLoads() const { return NumLoads;}
+  unsigned getNumLoads() const { return NumLoads; }
+  unsigned getNumCalls() const { return NumCalls; }
+
+  /// Returns all exiting blocks with a countable exit, i.e. the
+  /// exit-not-taken count is known exactly at compile time.
+  const SmallVector<BasicBlock *, 4> &getCountableExitingBlocks() const {
+    return CountableExitingBlocks;
+  }
+
+  /// Returns all the exiting blocks with an uncountable exit.
+  const SmallVector<BasicBlock *, 4> &getUncountableExitingBlocks() const {
----------------
fhahn wrote:

Only used in LoopVectorize/LoopVectorizationLegality, could this be moved there?

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


More information about the llvm-commits mailing list