[LLVMdev] [ARM] [PIC] optimizing the loading of hidden global variable

Tim Northover t.p.northover at gmail.com
Wed Mar 12 12:49:35 PDT 2014


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