[PATCH] D27775: [ThinLTO] Import composite types as declarations

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 09:15:51 PST 2016


I suppose this (applying this 'demote to declaration' optimization
universally) can be seen as consistent with -fstandalone-debug without
needing to be predicated by a flag. -fstandalone-debug tells you something
about how the rest of the program you can't see. When you can see it
(ThinLTO) you /know/ the type is available, you're not just assuming.

This will be harder to justify/figure out when we eventually move to the
next step of treating types the same way we do inline functions (in the
summary, specify one module that retains the type definition - all other
modules can demote their definitions of that type to a declaration). That's
consistent with the philosophy of -fstandalone-debug (because now you
/know/ the type is elsewhere) but will break LLDB.

On Thu, Dec 15, 2016 at 9:05 AM Adrian Prantl via Phabricator <
reviews at reviews.llvm.org> wrote:

> aprantl added a comment.
>
> Mehdi and I just ran a couple of experiments. LLDB can find
> forward-declared composite types that are defined in another .o file just
> fine; the only caveat is that LLDB has to potentially load the accelerator
> table of each .o file from disk in order to find the .o file with the
> definition in it. Judging from this, I think that this approach is fine.
>
>
> https://reviews.llvm.org/D27775
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161215/0784092d/attachment.html>


More information about the llvm-commits mailing list