[llvm] [NFC][LoopVectorize] Cache result of requiresScalarEpilogue (PR #108981)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 00:01:27 PDT 2024
================
@@ -1782,6 +1812,9 @@ class LoopVectorizationCostModel {
/// All element types found in the loop.
SmallPtrSet<Type *, 16> ElementTypesInLoop;
+
+ /// Keeps track of whether we require a scalar epilogue.
+ std::optional<bool> RequiresScalarEpilogue[2];
----------------
fhahn wrote:
```suggestion
std::optional<std::pari<bool, bool>> RequiresScalarEpilogue;
```
For consistency, other places use `std::pair`. Also good to document what the first/second elements are for.
https://github.com/llvm/llvm-project/pull/108981
More information about the llvm-commits
mailing list