[llvm] [LV][NFC] Refactor structures used to maintain uncountable exit info (PR #123219)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 17 07:19:33 PST 2025


================
@@ -654,18 +647,13 @@ class LoopVectorizationLegality {
   /// supported.
   bool StructVecCallFound = false;
 
-  /// Indicates whether this loop has an uncountable early exit, i.e. an
-  /// uncountable exiting block that is not the latch.
-  bool HasUncountableEarlyExit = false;
-
   /// Keep track of all the countable and uncountable exiting blocks if
   /// the exact backedge taken count is not computable.
   SmallVector<BasicBlock *, 4> CountableExitingBlocks;
-  SmallVector<BasicBlock *, 4> UncountableExitingBlocks;
 
-  /// Keep track of the destinations of all uncountable exits if the
-  /// exact backedge taken count is not computable.
-  SmallVector<BasicBlock *, 4> UncountableExitBlocks;
+  /// Keep track of the loop edge with an uncountable exit, comprising a pair
+  /// of (Exiting, Exit) blocks.
----------------
fhahn wrote:

```suggestion
  /// of (Exiting, Exit) blocks, if there is exactly one early exit.
```

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


More information about the llvm-commits mailing list