Skip to content

Commit 714096c

Browse files
authored
[LLVM] Skip dumping inline SDag children (#141359)
If they're simple enough to render inline, we don't need to dump them again in the recursive walk.
1 parent abcd19e commit 714096c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,9 @@ static void printrWithDepthHelper(raw_ostream &OS, const SDNode *N,
11651165
// Don't follow chain operands.
11661166
if (Op.getValueType() == MVT::Other)
11671167
continue;
1168+
// Don't print children that were fully rendered inline.
1169+
if (shouldPrintInline(*Op.getNode(), G))
1170+
continue;
11681171
OS << '\n';
11691172
printrWithDepthHelper(OS, Op.getNode(), G, depth - 1, indent + 2);
11701173
}

llvm/test/CodeGen/PowerPC/ppc64-icbt-pwr7.ll

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ entry:
1111

1212
; FIXME: Crashing is not really the correct behavior here, we really should just emit nothing
1313
; CHECK: Cannot select: {{0x[0-9,a-f]+|t[0-9]+}}: ch = Prefetch
14-
; CHECK: {{0x[0-9,a-f]+|t[0-9]+}}: i32 = TargetConstant<0>
15-
; CHECK-NEXT: {{0x[0-9,a-f]+|t[0-9]+}}: i32 = TargetConstant<3>
16-
; CHECK-NEXT: {{0x[0-9,a-f]+|t[0-9]+}}: i32 = TargetConstant<0>
1714

1815
}
1916

0 commit comments

Comments
 (0)