[PATCH] Prevent user-supplied libc implementations from premature removal in LTO

Duncan Exon Smith dexonsmith at apple.com
Mon Nov 4 15:34:57 PST 2013


On Nov 4, 2013, at 3:03 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:

> There is no need to check -globalopt in this patch too. Just check
> that  llvm.compiler.used is created with the value you expect.

Okay, makes sense.

> libLTO already knows about adding symbols used by inline asm to
> llvm.compiler.used. Maybe this code would be better there?

In particular, by modifying LTOCodeGenerator::applyRestriction?  That sounds nice and clean, except that I’m not sure how to get access to TargetLibraryInfo there.  Or is there a better way than TLI?





More information about the llvm-commits mailing list