[llvm] r244622 - Enable EliminateAvailableExternally pass in the LTO pipeline.
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 09:26:41 PDT 2015
Author: tejohnson
Date: Tue Aug 11 11:26:41 2015
New Revision: 244622
URL: http://llvm.org/viewvc/llvm-project?rev=244622&view=rev
Log:
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
Modified:
llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
Modified: llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp?rev=244622&r1=244621&r2=244622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp Tue Aug 11 11:26:41 2015
@@ -556,6 +556,9 @@ void PassManagerBuilder::addLateLTOOptim
// 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());
More information about the llvm-commits
mailing list