[llvm] [NFC][LoopVectorize] Cache result of requiresScalarEpilogue (PR #108981)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 26 08:42:06 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff ce6c236c965dc1bb5fa2257e17ea253a015705cc bf04a43aabd5eb907a706de843609cb8eeb85c3a --extensions cpp -- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 1ecf17c21b..33c01bdf3f 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -1383,7 +1383,8 @@ public:
// If we might exit from anywhere but the latch, must run the exiting
// iteration in scalar form.
if (TheLoop->getExitingBlock() != TheLoop->getLoopLatch()) {
- LLVM_DEBUG(dbgs() << "LV: Loop requires scalar epilogue: multiple exits");
+ LLVM_DEBUG(
+ dbgs() << "LV: Loop requires scalar epilogue: multiple exits");
return true;
}
if (IsVectorizing && InterleaveInfo.requiresScalarEpilogue()) {
@@ -1397,7 +1398,7 @@ public:
assert((Invalidate || !RequiresScalarEpilogue) &&
"Already determined scalar epilogue requirements!");
- std::pair<bool,bool> Result;
+ std::pair<bool, bool> Result;
Result.first = NeedsScalarEpilogue(true);
LLVM_DEBUG(dbgs() << ", when vectorizing\n");
Result.second = NeedsScalarEpilogue(false);
@@ -1796,7 +1797,7 @@ public:
SmallPtrSet<Type *, 16> ElementTypesInLoop;
/// Keeps track of whether we require a scalar epilogue.
- std::optional<std::pair<bool,bool>> RequiresScalarEpilogue;
+ std::optional<std::pair<bool, bool>> RequiresScalarEpilogue;
};
} // end namespace llvm
``````````
</details>
https://github.com/llvm/llvm-project/pull/108981
More information about the llvm-commits
mailing list