[PM] Port ModuleSummaryIndex analysis to new pass manager
authorTeresa Johnson <tejohnson@google.com>
Fri, 12 Aug 2016 13:53:02 +0000 (13:53 +0000)
committerTeresa Johnson <tejohnson@google.com>
Fri, 12 Aug 2016 13:53:02 +0000 (13:53 +0000)
commitf93b246f8b22137abe69842ab4a99747d95a7f7a
tree95b3703eb5458c5152ed11937dbd23d24a1f9cd4
parent565bdd9fed999909827d75a4bea27ace05b4445d
[PM] Port ModuleSummaryIndex analysis to new pass manager

Summary:
Port the ModuleSummaryAnalysisWrapperPass to the new pass manager.
Use it in the ported BitcodeWriterPass (similar to how we use the
legacy ModuleSummaryAnalysisWrapperPass in the legacy WriteBitcodePass).

Also, pass the -module-summary opt flag through to the new pass
manager pipeline and through to the bitcode writer pass, and add
a test that uses it.

Reviewers: mehdi_amini

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D23439

llvm-svn: 278508
llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h
llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassRegistry.def
llvm/test/Bitcode/thinlto-summary-globalvar.ll
llvm/tools/opt/NewPMDriver.cpp
llvm/tools/opt/NewPMDriver.h
llvm/tools/opt/opt.cpp