[PATCH] D17115: Define the ThinLTO Pipeline
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 10 16:59:30 PST 2016
joker.eph created this revision.
joker.eph added a reviewer: tejohnson.
joker.eph added subscribers: dexonsmith, llvm-commits.
Herald added a subscriber: joker.eph.
On the contrary to Full LTO, ThinLTO can afford to shift compile time
from the frontend to the linker: both phases are parallel.
This pipeline is based on the proposal in D13443 for full LTO. We ]
didn't move forward on this proposal because the link was far too long
after that.
This patch refactor the "function simplification" passes that are part
of the inliner loop in a helper function (this part is NFC and can be
commited separately to simplify the diff). The ThinLTO pipeline
integrates in the regular O2/O3 flow:
- The compile phase perform the inliner with a somehow lighter
function simplification. (TODO: tune the inliner thresholds here)
This is intendend to simplify the IR and get rid of obvious things
like linkonce_odr that will be inlined.
- The link phase will run the pipeline from the start, extended with
some specific passes that leverage the augmented knowledge we have
during LTO. Especially after the inliner is done, a sequence of
globalDCE/globalOpt is performed, followed by another run of the
"function simplification" passes.
The measurements on the public test suite as well as on our internal
suite show an overall net improvement. The binary size for the clang
executable is reduced by 5%. We're still tuning it with the bringup
of ThinLTO but this should provide a good starting point.
http://reviews.llvm.org/D17115
Files:
include/llvm/Transforms/IPO/PassManagerBuilder.h
lib/Transforms/IPO/PassManagerBuilder.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17115.47566.patch
Type: text/x-patch
Size: 10253 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160211/3a7bc36d/attachment.bin>
More information about the llvm-commits
mailing list