This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Do not replace existing nodes from DICompileUnit
ClosedPublic

Authored by ellis on Nov 24 2021, 11:24 AM.

Details

Summary

When creating a new DIBuilder with an existing DICompileUnit, load the
DINodes from the current DICompileUnit so they don't get overwritten.
This is done in the MachineOutliner pass, but it didn't change the CU so
the bug never appeared. We need this if we ever want to add DINodes to
the CU after it has been created, e.g., DIGlobalVariables.

Diff Detail

Event Timeline

ellis created this revision.Nov 24 2021, 11:24 AM
ellis added a project: debug-info.
ellis edited the summary of this revision. (Show Details)Nov 29 2021, 4:23 PM
ellis published this revision for review.Nov 29 2021, 5:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 29 2021, 5:05 PM
dblaikie accepted this revision.Nov 29 2021, 5:14 PM

What specific need to you have in mind for this?

This revision is now accepted and ready to land.Nov 29 2021, 5:14 PM
ellis added a comment.Nov 29 2021, 5:42 PM

What specific need to you have in mind for this?

The next diff in the stack D114565 is some work to implement ideas discussed in this RFC: https://groups.google.com/g/llvm-dev/c/r03Z6JoN7d4
In that diff we add debug info to globals that we generated for PGO builds.

What specific need to you have in mind for this?

The next diff in the stack D114565 is some work to implement ideas discussed in this RFC: https://groups.google.com/g/llvm-dev/c/r03Z6JoN7d4
In that diff we add debug info to globals that we generated for PGO builds.

Ah, thanks!

This revision was automatically updated to reflect the committed changes.