diff options
author | Teresa Johnson <tejohnson@google.com> | 2015-08-11 16:26:41 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2015-08-11 16:26:41 +0000 |
commit | c4279a7fb23680ea49613698f47537534541792e (patch) | |
tree | 804a605f10c9b8029cbd9c686c095a7bff521269 /llvm/lib | |
parent | a48040f787d364404ed88960aa263198ad51c7d9 (diff) | |
download | bcm5719-llvm-c4279a7fb23680ea49613698f47537534541792e.tar.gz bcm5719-llvm-c4279a7fb23680ea49613698f47537534541792e.zip |
Enable EliminateAvailableExternally pass in the LTO pipeline.
Summary:
For LTO we need to enable this pass in the LTO pipeline,
as it is skipped during the "-flto -c" compile step (when PrepareForLTO is
set).
Reviewers: rnk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11919
llvm-svn: 244622
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/IPO/PassManagerBuilder.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp index a4a1852de30..9f58b49288a 100644 --- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp +++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp @@ -556,6 +556,9 @@ void PassManagerBuilder::addLateLTOOptimizationPasses( // Delete basic blocks, which optimization passes may have killed. PM.add(createCFGSimplificationPass()); + // Drop bodies of available externally objects to improve GlobalDCE. + PM.add(createEliminateAvailableExternallyPass()); + // Now that we have optimized the program, discard unreachable functions. PM.add(createGlobalDCEPass()); |