forked from OSchip/llvm-project
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
This commit is contained in:
parent
a48040f787
commit
c4279a7fb2
|
@ -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());
|
||||
|
||||
|
|
Loading…
Reference in New Issue