[PATCH] D26146: [ThinLTO] Prevent exporting of locals used/defined in module level asm

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 1 13:47:55 PDT 2016


tejohnson added a comment.

In https://reviews.llvm.org/D26146#585158, @mehdi_amini wrote:

> The attribute((used)) goes beyond "what the compiler can see", it also prevents linker dead-strip.
>
> The point for references from inline ASM only applies to static globals (chromium build). It does not apply to non-static I believe, and this is why are currently parsing the module inline ASM at LTO time and updating the llvm.compiler_used, because this is not something the FE is required to do.


Then the assumption works for this fix since it is only looking for static globals (i.e. local linkage), right? I can just update the description and possibly the code comment if that is the case


https://reviews.llvm.org/D26146





More information about the llvm-commits mailing list