[PATCH] D45199: AArch64: Allow offsets to be folded into addresses with ELF.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 2 22:26:36 PDT 2018


pcc created this revision.
pcc added reviewers: t.p.northover, olista01.
Herald added subscribers: hiraditya, kristof.beyls, eraman, javed.absar, mehdi_amini, rengolin.

This is a code size win in code that takes offseted addresses
frequently, such as C++ constructors that typically need to compute
an offseted address of a vtable. It reduces the size of Chromium for
Android's .text section by 46KB, or 56KB with ThinLTO (which exposes
more opportunities to use a direct access rather than a GOT access).

Because the addend range is limited in COFF and Mach-O, this is
enabled for ELF only.


https://reviews.llvm.org/D45199

Files:
  llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/test/CodeGen/AArch64/arm64-2012-05-07-MemcpyAlignBug.ll
  llvm/test/CodeGen/AArch64/arm64-addrmode.ll
  llvm/test/CodeGen/AArch64/arm64-atomic-128.ll
  llvm/test/CodeGen/AArch64/arm64-memcpy-inline.ll
  llvm/test/CodeGen/AArch64/arm64-misched-multimmo.ll
  llvm/test/CodeGen/AArch64/arm64-variadic-aapcs.ll
  llvm/test/CodeGen/AArch64/arm64-vector-ldst.ll
  llvm/test/CodeGen/AArch64/cmpxchg-O0.ll
  llvm/test/CodeGen/AArch64/func-argpassing.ll
  llvm/test/CodeGen/AArch64/func-calls.ll
  llvm/test/CodeGen/AArch64/misched-fusion-addr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45199.140738.patch
Type: text/x-patch
Size: 34230 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180403/21a2f5a4/attachment.bin>


More information about the llvm-commits mailing list