[PATCH] D55309: ThinLTO: Do not import debug info for imported global constants

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 4 19:01:22 PST 2018


dblaikie added a comment.

Ah, I found a comment from the original review:

"Now importing globals list from DICompileUnit in IRMover. This is needed because we may internalise GV in destination module, so it can reach final link."

If someone could provide me with an example of this happening, I'd love to take a look & see what we need to do. How badly this current patch fails in that situation (if it's not too bad, maybe we go with it for now to fix the regression - while working on a more accurate fix). The more accurate fix, I imagine, would be to only import the DIGlobalVariable for the particular imported variables - same way we would do for functions (but of course for variables it's a bit harder - for functions we fixed this by inverting the relationship between the DICompileUnit and the DISubprogram (so the subprogram points to the CU - subprograms are pulled in whenever their function is - even an optimized-away function has the inlined description that holds it live, global variables don't have those luxuries))


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55309/new/

https://reviews.llvm.org/D55309





More information about the llvm-commits mailing list