[llvm] [Pipeliner] Fix Phi node dependency calculation (PR #160056)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 22 02:29:59 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 origin/main HEAD --extensions cpp -- llvm/lib/CodeGen/MachinePipeliner.cpp
``````````
: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/CodeGen/MachinePipeliner.cpp b/llvm/lib/CodeGen/MachinePipeliner.cpp
index 4b9e3fda4..3be2e48ee 100644
--- a/llvm/lib/CodeGen/MachinePipeliner.cpp
+++ b/llvm/lib/CodeGen/MachinePipeliner.cpp
@@ -3013,10 +3013,11 @@ bool SwingSchedulerDAG::mayOverlapInLaterIter(
// having the same value, but not from the same parent instruction.
// This is possible if the values come via phi nodes. So check
// for the parents of phi nodes.
- auto doesOverlap = [&](MachineInstr* MI, MachineInstr* MI2) {
+ auto doesOverlap = [&](MachineInstr *MI, MachineInstr *MI2) {
if (MI->isPHI()) {
for (auto MO : MI->operands()) {
- if (!MO.isReg()) continue;
+ if (!MO.isReg())
+ continue;
if (MI2 == MRI.getVRegDef(MO.getReg()))
return true;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/160056
More information about the llvm-commits
mailing list