[llvm] [InstCombine] Expand redundant phi cycle elimination (PR #67968)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 2 04:11:25 PDT 2023
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 414ff812d6241b728754ce562081419e7fc091eb 543e8ea164b02e1c1a5b603a794d930a5dc0bd3a -- llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp b/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
index 3ce500517bc2..9b1473baf64f 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
@@ -997,7 +997,7 @@ static bool isDeadPHICycle(PHINode *PN,
/// This happens with mutually cyclic phi nodes like:
/// z = some value; x = phi (y, z); y = phi (x, z)
static bool PHIsEqualValue(PHINode *PN, Value *&NonPhiInVal,
- SmallPtrSetImpl<PHINode*> &ValueEqualPHIs) {
+ SmallPtrSetImpl<PHINode *> &ValueEqualPHIs) {
// See if we already saw this PHI node.
if (!ValueEqualPHIs.insert(PN).second)
return true;
@@ -1509,7 +1509,7 @@ Instruction *InstCombinerImpl::visitPHINode(PHINode &PN) {
// phi values. Scan PHI nodes to see if they all merge in each other or
// the value.
if (InValNo == NumIncomingVals) {
- SmallPtrSet<PHINode*, 16> ValueEqualPHIs;
+ SmallPtrSet<PHINode *, 16> ValueEqualPHIs;
if (PHIsEqualValue(&PN, NonPhiInVal, ValueEqualPHIs))
return replaceInstUsesWith(PN, NonPhiInVal);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/67968
More information about the llvm-commits
mailing list