[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:32 PST 2025


================
@@ -463,14 +460,10 @@ class LoopVectorizationLegality {
     return CountableExitingBlocks;
   }
 
-  /// Returns all the exiting blocks with an uncountable exit.
-  const SmallVector<BasicBlock *, 4> &getUncountableExitingBlocks() const {
-    return UncountableExitingBlocks;
-  }
-
-  /// Returns all the exit blocks from uncountable exiting blocks.
-  SmallVector<BasicBlock *, 4> getUncountableExitBlocks() const {
-    return UncountableExitBlocks;
+  /// Returns the loop edge with an uncountable exit.
----------------
fhahn wrote:

Would be good to cover also the empty case, perhaps something like

```suggestion
  /// Returns the loop edge with an uncountable exit or std::nullopt if there isn't a single such edge.
```

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


More information about the llvm-commits mailing list