Skip to content

Commit c4279a7

Browse files
committedAug 11, 2015
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
1 parent a48040f commit c4279a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎llvm/lib/Transforms/IPO/PassManagerBuilder.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,9 @@ void PassManagerBuilder::addLateLTOOptimizationPasses(
556556
// Delete basic blocks, which optimization passes may have killed.
557557
PM.add(createCFGSimplificationPass());
558558

559+
// Drop bodies of available externally objects to improve GlobalDCE.
560+
PM.add(createEliminateAvailableExternallyPass());
561+
559562
// Now that we have optimized the program, discard unreachable functions.
560563
PM.add(createGlobalDCEPass());
561564

0 commit comments

Comments
 (0)
Please sign in to comment.