[PATCH] D111916: [DebugInfo] Fixup DIEs for inlined functions

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 19 16:45:41 PDT 2021


dblaikie added a comment.

In D111916#3073199 <https://reviews.llvm.org/D111916#3073199>, @ellis wrote:

> In D111916#3067928 <https://reviews.llvm.org/D111916#3067928>, @dblaikie wrote:
>
>> Maybe we could always create the abstract origin, then at the end collapse it down into the concrete definition if it's unused/there are no inline instances? Less need to try to separate things out?
>
> Since some inlined functions also have concrete instances, we won't know until the end of the module if a function with a concrete instance should have an abstract origin or not.

Yep, that's why I was suggesting doing it always - because we don't know.

> That means we have to maintain both an abstract origin and possibly a concrete DIE for every function, then at the end replace the abstract origin if it isn't used.

Yep.

> I think this will cost a lot more memory and also require deleting a DIE, which I haven't seen in the code.

be nice to have some data on how much memory that costs - I'm not sure deleting a DIE would be complicated (I haven't checked on the ownership model in a while) - I think they're block allocated, and the block allocator handles cleaning them up? So having a DIE that gets removed from the DIE tree is /probably/ OK?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111916



More information about the llvm-commits mailing list