[PATCH] D44963: ELF: Add support for short thunks on ARM.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 27 15:39:59 PDT 2018


pcc created this revision.
pcc added reviewers: ruiu, espindola, peter.smith.
Herald added subscribers: kristof.beyls, arichardson, javed.absar, emaste.

A short thunk uses a direct branch (b or b.w) instruction, and is used
when the target has the same thumbness as the thunk and is within
direct branch range (32MB for ARM, 16MB for Thumb-2). Reduces the
size of Chromium for Android's .text section by around 160KB.

Depends on https://reviews.llvm.org/D44962


https://reviews.llvm.org/D44963

Files:
  lld/ELF/Thunks.cpp
  lld/test/ELF/Inputs/far-long-arm-abs.s
  lld/test/ELF/arm-branch-rangethunk.s
  lld/test/ELF/arm-thumb-condbranch-thunk.s
  lld/test/ELF/arm-thumb-range-thunk-os.s
  lld/test/ELF/arm-thumb-thunk-empty-pass.s
  lld/test/ELF/arm-thunk-largesection.s
  lld/test/ELF/arm-thunk-linkerscript-large.s
  lld/test/ELF/arm-thunk-linkerscript-sort.s
  lld/test/ELF/arm-thunk-multipass.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44963.140015.patch
Type: text/x-patch
Size: 27211 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180327/9bbeec3b/attachment-0001.bin>


More information about the llvm-commits mailing list