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

Kolya Panchenko via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 11:03:50 PDT 2024


================
@@ -696,6 +721,17 @@ class LoopAccessInfo {
   /// Cache the result of analyzeLoop.
   bool CanVecMem = false;
   bool HasConvergentOp = false;
+  bool LoopMayFault = false;
+
+  /// Keeps track of the early-exiting block, if present.
+  BasicBlock *SpeculativeEarlyExitingBB = nullptr;
+
+  /// Keeps track of the successor of the early-exiting block, if present.
+  BasicBlock *SpeculativeEarlyExitBB = nullptr;
+
+  /// Keeps track of all the early exits with known or countable exit-not-taken
+  /// counts.
+  SmallVector<BasicBlock *, 4> CountableEarlyExitingBlocks;
----------------
nikolaypanchenko wrote:

Since such BBs are taken from `getCountableExitingBlocks`, can this be named `CountableExitingBlocks`  ? At least in this case that container can be used for regular loops too

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


More information about the llvm-commits mailing list