[llvm] [Transforms] Vectorizing Mem2Reg Pass (PR #107688)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 7 04:09:56 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 c28b1a19aadff97b369889aee084073a181cfda8 88f37a9a373b058d220d322fde2401a8e7c17400 --extensions h,cpp -- llvm/include/llvm/Support/GenericDomTree.h llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
index 570d37fd4f..04b89db3e0 100644
--- a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
+++ b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
@@ -513,10 +513,9 @@ class VectorizedMem2Reg {
State(size_t MaxBlockNumber) : StateVector(MaxBlockNumber) {}
~State() {
- assert(llvm::all_of(StateVector,
- [](const BlockState &V) {
- return V.UpdateState.none();
- }));
+ assert(llvm::all_of(StateVector, [](const BlockState &V) {
+ return V.UpdateState.none();
+ }));
}
// Select which kind of state to access. BN is the index of the basic block.
@@ -1356,7 +1355,7 @@ bool VectorizedMem2Reg::GatherAlloca(AllocaInst *AI, const AllocaInfo &Info) {
Allocas.push_back(AI);
// Populate DEF states.
- for (BasicBlock* Def : Info.DefiningBlocks) {
+ for (BasicBlock *Def : Info.DefiningBlocks) {
// We need to calculate IDF of every DEF block, adding them to the PQ here
// so that a BB is only added once at most.
if (BlockStates.get<DEF_STATE>(Def->getNumber()).none())
``````````
</details>
https://github.com/llvm/llvm-project/pull/107688
More information about the llvm-commits
mailing list