[llvm] [LLVM] Skip dumping inline SDag children (PR #141359)
via llvm-commits
llvm-commits at lists.llvm.org
Sat May 24 09:50:13 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-selectiondag
Author: Jon Roelofs (jroelofs)
<details>
<summary>Changes</summary>
If they're simple enough to render inline, we don't need to dump them again in the recursive walk.
---
Full diff: https://github.com/llvm/llvm-project/pull/141359.diff
1 Files Affected:
- (modified) llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp (+3)
``````````diff
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);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/141359
More information about the llvm-commits
mailing list