[llvm-dev] DWARF Generator

Robinson, Paul via llvm-dev llvm-dev at lists.llvm.org
Fri Nov 18 12:23:00 PST 2016

Re DW_FORM_string the savings is small but since it came up I thought 
I'd mention the idea.  I agree it's not worth pursuing any further.  
An API to use that form explicitly (that isn't the normal debug-info
generation API) to facilitate testing is fine.

Regarding DWARF parsing speed where strings are concerned:  DWARF 5 will 
ruin this because DW_FORM_strx is a ULEB; so, every DIE that has a 
DW_AT_name or DW_AT_linkage_name will become variable-size (just as bad
as DW_FORM_string).  In a RelWithDebInfo build of Clang, I got just over 
100 million DIEs and 40.2% had DW_AT_name.  I didn't try to count DIEs 
that had DW_AT_linkage_name without DW_AT_name; it can happen, though, so 
the number of variable-size DIEs in DWARF 5 will actually be higher than 

Maybe we should propose a fixed-size variant of FORM_strx, or that strx 
just be fixed size?  The public-comment review period for DWARF 5 is not 
over yet, and this seems like a valid concern.

More information about the llvm-dev mailing list