[LLVMdev] [ARM] [PIC] optimizing the loading of hidden global variable
weimingz at codeaurora.org
weimingz at codeaurora.org
Thu Mar 13 21:45:57 PDT 2014
Hi Tim,
The global merge pass puts the GVs into a sturcture to guarantee their
address are contiguous.
It works for static GVs but for global hidden GVs, this will cause name
resoltion fail during linking .o into .so
Any thoughs?
Thanks,
Weiming
> Hi Weiming,
>
> On 12 March 2014 17:43, Weiming Zhao <weimingz at codeaurora.org> wrote:
>> Clang will emit 1 GOT entry for each GV and 2 instructions to get the
>> address:
>>
>> GCC does this only for the first GV. The rest GV address are computed
>> directly:
>
> This looks like it would be the job of lib/Transforms/GlobalMerge.cpp.
> It looks like ARM runs it in all cases, perhaps it doesn't understand
> some ELF linkage subtleties?
>
> Cheers.
>
> Tim.
>
More information about the llvm-dev
mailing list