[LLVM] Skip dumping inline SDag children#141359
Merged
Merged
Conversation
If they're simple enough to render inline, we don't need to dump them again in the recursive walk.
Member
|
@llvm/pr-subscribers-backend-powerpc @llvm/pr-subscribers-llvm-selectiondag Author: Jon Roelofs (jroelofs) ChangesIf 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:
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);
}
|
Contributor
Author
|
Great suggestion from @fpetrogalli in #141295 to simplify these dumps: |
Contributor
|
There's a PowerPC test failing that checks the debug output |
topperc
approved these changes
May 25, 2025
Contributor
topperc
left a comment
There was a problem hiding this comment.
LGTM with the PPC test fixed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


If they're simple enough to render inline, we don't need to dump them again in the recursive walk.