[LLVMdev] Proposal: type uniquing of debug info for LTO

David Blaikie dblaikie at gmail.com
Fri Jun 21 11:20:17 PDT 2013


On Fri, Jun 21, 2013 at 10:44 AM, Renato Golin <renato.golin at linaro.org> wrote:
> On 21 June 2013 18:35, David Blaikie <dblaikie at gmail.com> wrote:
>>
>> using the actual language mangling's probably a good idea
>
>
> Yup, sounds good.
>
>
>> That's the invariant, yes. Named metadata are the roots of the
>> glorious metadata tree from which the debug info fruit grows. Or
>> something.
>
>
> So, that fits well today, since (from another thread) we generate debug info
> when really needed, so types should not need to be trimmed.
>
> If we ever generate types that later become unnecessary, we could bloat the
> dwarf table, no?

The question isn't necessarily valid - just because code is optimized
away doesn't mean the type is unnecessary. Users debugging code still
may want to know what the type was & how to interact with it, etc.

Yes, there are some corner cases (we've discussed emitting types only
into the TU with the key function, if there is one - but we'd still
have to emit the full definition into other TUs that say, have a
variable of that type - sure, if we optimized out that variable we
could maybe drop the type definition to a declaration)



More information about the llvm-dev mailing list