1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Run GlobalOpt before emitting the bitcode for ThinLTO

This is motivated by reducing the size of the IR and thus reduce
compile time.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 267385
This commit is contained in:
Mehdi Amini 2016-04-25 08:47:49 +00:00
parent 6153f5124e
commit c143a7b981

View File

@ -404,6 +404,8 @@ void PassManagerBuilder::populateModulePassManager(
// unrolling/vectorization/... now. We'll first run the inliner + CGSCC passes
// during ThinLTO and perform the rest of the optimizations afterward.
if (PrepareForThinLTO) {
// Reduce the size of the IR as much as possible.
MPM.add(createGlobalOptimizerPass());
// Rename anon function to be able to export them in the summary.
MPM.add(createNameAnonFunctionPass());
return;