[llvm-dev] DWARF: Reconstituting mangled names (& skipping DW_AT_linkage_name)

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Thu Jun 24 17:32:07 PDT 2021

In addition to simplifying template names (
https://groups.google.com/g/llvm-dev/c/ekLMllbLIZg ) another case I've
found in my use case is a lot of mangled names (in part because we build
with -fdebug-info-for-profiling which turns on function linkage names even
at -g1/-gmlt).

So I was wondering if we could recreate linkage names from DWARF, rather
than encoding them directly - and I have a prototype that seems to show
this is possible (at least some simple cases - including some template

In the pathological case I'm looking at (lots of expression templates in
TensorFlow) skipping linkage names in the cases I think we can reconstitute
(but I haven't implemented the full logic and verified everything can be
reconstituted) reduced .debug_str.dwo by 52% (and that composes/stacks with
the 43% reduction from the simplified template names - for a 95% reduction
in total) and in a large but less pathological binary it was 56% (in
addition to 25% from the template names, still 80% reduction overall).

Wondering if anyone's interested in this? Has
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210624/76281367/attachment.html>

More information about the llvm-dev mailing list