[llvm] [AsmPrinter][DebugNames] Implement DW_IDX_parent entries (PR #77457)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 11 10:15:26 PST 2024


dwblaikie wrote:

> It can't be unnamed, because we need to check that the name is "A". But at the same time, it cannot be named because a debugger querying just "A" should never find it (it is a declaration). It really sounds like no-standalone-debug was not considered during standardization.

I meant it might be marginally cheaper to be able to parse the DIE from the unnamed entry than to have to parse all the DWARF in the CU to find the parent. (there's no easy way to find the parent of a DIE short of walking all/a lot of the DIEs in the CU - so being given the exact offset to the parent would potentially allow a more efficient negative result (positive result probably has to parse a bunch of other DWARF in the CU anyway, but a negative one could get away with one or maybe a few DIEs for each parent (it could be more than one if the DIE had a DW_AT_specification or similar that required going off to read another DIE to find th ename)))

> But even using no-standalone-debug, with the current version of the patch we will still improve queries for DIEs that were not optimized away, and not regress ones that were.

Sure sure - that's progress at least.

https://github.com/llvm/llvm-project/pull/77457


More information about the llvm-commits mailing list