[PATCH] D34156: [LTO] Add -femit-summary-index flag to emit summary for regular LTO
Tobias Edler von Koch via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 13 11:36:31 PDT 2017
tobiasvk created this revision.
Herald added subscribers: eraman, inglorion.
With https://reviews.llvm.org/D33921, we gained the ability to have module summaries in regular
LTO modules without triggering ThinLTO compilation. There is however,
currently, no way to trigger the emission of a module summary with
regular LTO in Clang. This patch adds a flag -femit-summary-index which
makes that possible.
Why would you want a summary with regular LTO?
The Qualcomm Linker performs a two-phase garbage collection (a.k.a. dead
stripping): firstly, before LTO compilation, and then again afterwards.
The key advantage of already running GC before LTO is that in links that
involve a heavy mix of ELF objects and bitcode (a critical use case for
us), we can prune some of the dependences between bitcode and ELF and
thus internalize more symbols in LTO.
For this to work, the linker needs to be able to inspect the reference
graphs for bitcode modules and the module summary provides exactly that.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7006 bytes
Desc: not available
More information about the cfe-commits