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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244622
91177308-0d34-0410-b5e6-
96231b3b80d8
// 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());