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

Ellis Hoag via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 22 12:06:35 PDT 2021


ellis added a comment.

In D111916#3074088 <https://reviews.llvm.org/D111916#3074088>, @dblaikie wrote:

> 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?

I did some testing and it isn't very hard to remove a DIE from the tree, but I ran into some problems when I tried to maintain a concrete and abstract DIE for every function, so I didn't measure the memory overhead. The problem with deferring the decision of making a DIE concrete or abstract is that `updateSubprogramScopeDIE()`, which makes a DIE concrete by adding location info, references the MF and must be called only when processing that function.

However, I realized it isn't hard to iterate through the module's functions to see which SP are concrete. Then we can know when it is not ok to create a concrete DIE and instead create/reference the abstract DIE. I've just created https://reviews.llvm.org/D112337 which does this.


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