[llvm] [LLVM] Skip dumping inline SDag children (PR #141359)
Jon Roelofs via llvm-commits
llvm-commits at lists.llvm.org
Mon May 26 16:37:01 PDT 2025
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/141359
>From 3062597c202bf95cb6b5a8d7d9f1326b84e32845 Mon Sep 17 00:00:00 2001
From: Jon Roelofs <jonathan_roelofs at apple.com>
Date: Sat, 24 May 2025 09:46:08 -0700
Subject: [PATCH 1/2] [LLVM] Skip dumping inline SDag children
If they're simple enough to render inline, we don't need to dump them again in
the recursive walk.
---
llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
index ee4297f3ad8ce..61c6a9470e531 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
@@ -1165,6 +1165,9 @@ static void printrWithDepthHelper(raw_ostream &OS, const SDNode *N,
// Don't follow chain operands.
if (Op.getValueType() == MVT::Other)
continue;
+ // Don't print children that were fully rendered inline.
+ if (shouldPrintInline(*Op.getNode(), G))
+ continue;
OS << '\n';
printrWithDepthHelper(OS, Op.getNode(), G, depth - 1, indent + 2);
}
>From 27edd510f0fbff2978bf16e99de67455500df6e5 Mon Sep 17 00:00:00 2001
From: Jon Roelofs <jonathan_roelofs at apple.com>
Date: Mon, 26 May 2025 16:36:41 -0700
Subject: [PATCH 2/2] fix the ppc test
---
llvm/test/CodeGen/PowerPC/ppc64-icbt-pwr7.ll | 3 ---
1 file changed, 3 deletions(-)
diff --git a/llvm/test/CodeGen/PowerPC/ppc64-icbt-pwr7.ll b/llvm/test/CodeGen/PowerPC/ppc64-icbt-pwr7.ll
index c9de1d8fc4334..c84eb8509ba56 100644
--- a/llvm/test/CodeGen/PowerPC/ppc64-icbt-pwr7.ll
+++ b/llvm/test/CodeGen/PowerPC/ppc64-icbt-pwr7.ll
@@ -11,9 +11,6 @@ entry:
; FIXME: Crashing is not really the correct behavior here, we really should just emit nothing
; CHECK: Cannot select: {{0x[0-9,a-f]+|t[0-9]+}}: ch = Prefetch
-; CHECK: {{0x[0-9,a-f]+|t[0-9]+}}: i32 = TargetConstant<0>
-; CHECK-NEXT: {{0x[0-9,a-f]+|t[0-9]+}}: i32 = TargetConstant<3>
-; CHECK-NEXT: {{0x[0-9,a-f]+|t[0-9]+}}: i32 = TargetConstant<0>
}
More information about the llvm-commits
mailing list