[PATCH] D36507: [ARM] GlobalISel: Select globals in PIC mode

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 9 02:22:55 PDT 2017


rovka created this revision.
Herald added subscribers: kristof.beyls, igorb, javed.absar, aemerson.

Support the selection of G_GLOBAL_VALUE in the PIC relocation model. For
simplicity we use the same pseudoinstructions for both Darwin and ELF:
(MOV|LDRLIT)_ga_pcrel(_ldr).

This is new for ELF, so it requires a small update to the ARM pseudo
expansion pass to make sure it adds the correct constant pool modifier
and add-current-address in the case of ELF.


https://reviews.llvm.org/D36507

Files:
  lib/Target/ARM/ARMExpandPseudoInsts.cpp
  lib/Target/ARM/ARMInstructionSelector.cpp
  lib/Target/ARM/ARMSubtarget.cpp
  lib/Target/ARM/ARMSubtarget.h
  test/CodeGen/ARM/GlobalISel/arm-isel-globals-pic.ll
  test/CodeGen/ARM/GlobalISel/arm-select-globals-pic.mir
  test/CodeGen/ARM/GlobalISel/arm-unsupported.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36507.110335.patch
Type: text/x-patch
Size: 10842 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170809/2368e6ed/attachment.bin>


More information about the llvm-commits mailing list