-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip generating DWARF info for dead code #3498
Skip generating DWARF info for dead code #3498
Conversation
@@ -367,6 +389,11 @@ where | |||
continue; | |||
} | |||
|
|||
if is_dead_code(entry) { | |||
skip_children = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not personally really all that familiar with this code, but it seems to me like skip_children
should be reset back to false
at some point after all children have been skipped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, of course. I'll fix that and update the test to make sure it's done properly.
33a83b0
to
2ee62ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading over this some more it appears that the depth_delta
and skip_at_depth
variables are used as an alternative form of skipping here? Is that something where these two methods of skipping can get unified into one which uses next_sibling
and/or next_dfs
?
2ee62ab
to
08e55fd
Compare
Yeah good point. Looking at |
08e55fd
to
dde0d01
Compare
When encountering a subprogram that is dead code (as indicated by the dead code proposal https://dwarfstd.org/ShowIssue.php?issue=200609.1), don't generate debug output for the subprogram or any of its children.
dde0d01
to
221fe7d
Compare
Thanks! |
When encountering a subprogram that is dead code (as indicated by the dead code proposal https://dwarfstd.org/ShowIssue.php?issue=200609.1), don't generate debug output for the subprogram or any of its children.
Here's an attempt at fixing #3403
When encountering a subprogram that is dead code (as indicated by the
dead code proposal
https://dwarfstd.org/ShowIssue.php?issue=200609.1), don't generate debug
output for the subprogram or any of its children.