[PATCH] D29104: Add !associated metadata.

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 17:32:47 PST 2017


mehdi_amini added a comment.

In https://reviews.llvm.org/D29104#655669, @eugenis wrote:

> In https://reviews.llvm.org/D29104#655651, @mehdi_amini wrote:
>
> > I mean the specific optimizations that won't happen that motivate not using llvm.compiler.used.
>
>
> I'm not sure. Perhaps, link time devirtualization? Without this, ASan would have to add every single global to llvm.compiler.used, which would make globaldce not do anything at all.


It'll still operate on every functions. And this is what happens on Darwin today.

> If anything, it is bad for the object file size.

Linker will garbage collect.

> The real reason is w/o the GlobalDCE change !associated has strange semantics - it protects a global from linker GC, but only if said global survives compiler GC. I don't see how that is useful.

I'm not convinced at all by the `!associated` at this point, in particular I haven't seen anything it does which is different from what is done on Darwin.


Repository:
  rL LLVM

https://reviews.llvm.org/D29104





More information about the llvm-commits mailing list