[llvm] [SSAUpdaterBulk] Add PHI simplification pass. (PR #132004)

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 21 03:25:08 PDT 2025


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 5488ad8f25cf6052ad5d03a911c68dd9d5c6460f 241b30001722f984cd6a3e8aefd0233fc0afbc83 --extensions cpp,h -- llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp llvm/unittests/Transforms/Utils/SSAUpdaterBulkTest.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp b/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp
index 7edfa39408..4e59555068 100644
--- a/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp
+++ b/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp
@@ -232,7 +232,7 @@ bool SSAUpdaterBulk::simplifyPass(SmallVectorImpl<PHINode *> &Worklist) {
   auto findEquivalentPHI = [](PHINode *PHI) -> Value * {
     BasicBlock *BB = PHI->getParent();
     for (auto &OtherPHI : BB->phis()) {
-      if (PHI != &OtherPHI && PHI->isIdenticalToWhenDefined(&OtherPHI)) 
+      if (PHI != &OtherPHI && PHI->isIdenticalToWhenDefined(&OtherPHI))
         return &OtherPHI;
     }
     return nullptr;

``````````

</details>


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


More information about the llvm-commits mailing list