[PATCH] D60421: [ThinLTO] Fix ThinLTOCodegenerator to export llvm.used symbols

ben via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 08:25:42 PDT 2019


bd1976llvm added a comment.

Hi Steven,

I missed that this work was being done - sorry.

Currently the legacy api does not require the IRSymtab to be written to the bitcode files so there is potentially a performance degradation due to this approach and the generated bitcode files will be larger, did you measure that? There is also a hidden performance cost that if the bitcode needs upgrading then the IRSymtab must be regenerated which can be expensive.

An alternative approach is for the legacy api to get the list of used symbols from the bitcode and expose them via the lto_symbol_attributes; the system linker can then add "used" symbols to the preserve list directly. This seems more in-keeping with the original design IMO.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60421/new/

https://reviews.llvm.org/D60421





More information about the llvm-commits mailing list