[llvm] [Reassociate] Compute value ranks iteratively (PR #204952)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 20 21:21:26 PDT 2026
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 origin/main HEAD --extensions cpp -- llvm/lib/Transforms/Scalar/Reassociate.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp
index b0c5b7d3f..9e7c0507b 100644
--- a/llvm/lib/Transforms/Scalar/Reassociate.cpp
+++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp
@@ -277,8 +277,8 @@ unsigned ReassociatePass::getRank(Value *V) {
!match(CurI, m_FNeg(m_Value())))
++Rank;
- LLVM_DEBUG(dbgs() << "Calculated Rank[" << CurI->getName() << "] = "
- << Rank << "\n");
+ LLVM_DEBUG(dbgs() << "Calculated Rank[" << CurI->getName() << "] = " << Rank
+ << "\n");
ValueRankMap[CurI] = Rank;
if (CompleteRank(Rank))
``````````
</details>
https://github.com/llvm/llvm-project/pull/204952
More information about the llvm-commits
mailing list