summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-04-25 08:47:49 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-04-25 08:47:49 +0000
commitbf4513b9aa2bb27b0464b8f9d047b6c8d26699cd (patch)
tree14feec71ce90de7917e5fd960a219f0842ddccfb
parentf72ca86b716ef52186c533f82abe0c4da0dea116 (diff)
downloadbcm5719-llvm-bf4513b9aa2bb27b0464b8f9d047b6c8d26699cd.tar.gz
bcm5719-llvm-bf4513b9aa2bb27b0464b8f9d047b6c8d26699cd.zip
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
-rw-r--r--llvm/lib/Transforms/IPO/PassManagerBuilder.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
index 7867bf44a52..0dc44c660f1 100644
--- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -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;
OpenPOWER on IntegriCloud