[PATCH] Prevent user-supplied libc implementations from premature removal in LTO
Duncan Exon Smith
dexonsmith at apple.com
Mon Nov 4 17:13:08 PST 2013
On Nov 4, 2013, at 3:49 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
> On 4 November 2013 15:34, Duncan Exon Smith <dexonsmith at apple.com> wrote:
>> 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?
>
> I think you can just do "new TargetLibraryInfo(TargetTriple);" like opt does.
>
> Cheers,
> Rafael
Please have another look!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-runtime-library-functions-to-compiler-used.patch
Type: application/octet-stream
Size: 4076 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131104/ff2564a5/attachment.obj>
More information about the llvm-commits
mailing list