[PATCH] D20268: [wip] Resolution-based LTO API.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 22:48:48 PDT 2016


pcc created this revision.
pcc added reviewers: rafael, joker.eph, tejohnson.
pcc added a subscriber: llvm-commits.
pcc added a dependency: D20258: IR: Introduce can_omit_from_dynsym attribute..
Herald added a subscriber: joker.eph.

This introduces a resolution-based LTO API. The main advantage of this API over
existing APIs is that it allows the linker to supply a resolution for each
symbol in each object, rather than the combined object as a whole. This will
become increasingly important for use cases such as ThinLTO which require us
to process symbol resolutions in a more complicated way than just adjusting
linkage.

TODO:

- Move to a separate library.

- Visibility resolution. I suspect that this doesn't in fact require any
  extensions to the API. Instead the resolution would describe the effect
  of the resolved visibility. For example, when targeting ELF, if the
  linkage unit contains a definition of a symbol, and we are compiling an
  executable, or the symbol's resolved visibility is protected or less,
  the DefinitionInLinkageUnit flag would be set in the resolution, which
  would cause references to be direct rather than going through the GOT.

- Implement parallel codegen and ThinLTO.

- Add a command line test harness, and port some existing gold plugin tests
  to the harness.

Depends on D20258

http://reviews.llvm.org/D20268

Files:
  include/llvm/LTO/LTO.h
  lib/LTO/CMakeLists.txt
  lib/LTO/LTO.cpp
  test/tools/gold/X86/common.ll
  test/tools/gold/X86/emit-llvm.ll
  test/tools/gold/X86/start-lib-common.ll
  tools/gold/CMakeLists.txt
  tools/gold/gold-plugin.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20268.57282.patch
Type: text/x-patch
Size: 38947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160514/88e265bf/attachment.bin>


More information about the llvm-commits mailing list