diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2017-01-20 22:18:52 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2017-01-20 22:18:52 +0000 |
| commit | e02b74e294132ae3b34eee2d91b46c830dc2b21b (patch) | |
| tree | 4c88f8cfd6a7637723d955748add56b6766acc06 /llvm/lib/Transforms/IPO | |
| parent | 0c1c70aef4a1d97188fde20e894bafeccd64224c (diff) | |
| download | bcm5719-llvm-e02b74e294132ae3b34eee2d91b46c830dc2b21b.tar.gz bcm5719-llvm-e02b74e294132ae3b34eee2d91b46c830dc2b21b.zip | |
IPO, LTO: Plumb the summary from the LTO API into the pass manager.
Differential Revision: https://reviews.llvm.org/D28840
llvm-svn: 292661
Diffstat (limited to 'llvm/lib/Transforms/IPO')
| -rw-r--r-- | llvm/lib/Transforms/IPO/PassManagerBuilder.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp index d086ee05a64..8d0963f2060 100644 --- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp +++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp @@ -833,6 +833,10 @@ void PassManagerBuilder::populateThinLTOPassManager( if (VerifyInput) PM.add(createVerifierPass()); + if (Summary) + PM.add( + createLowerTypeTestsPass(LowerTypeTestsSummaryAction::Import, Summary)); + populateModulePassManager(PM); if (VerifyOutput) @@ -857,8 +861,9 @@ void PassManagerBuilder::populateLTOPassManager(legacy::PassManagerBase &PM) { // Lower type metadata and the type.test intrinsic. This pass supports Clang's // control flow integrity mechanisms (-fsanitize=cfi*) and needs to run at // link time if CFI is enabled. The pass does nothing if CFI is disabled. - PM.add(createLowerTypeTestsPass(LowerTypeTestsSummaryAction::None, - /*Summary=*/nullptr)); + PM.add(createLowerTypeTestsPass(Summary ? LowerTypeTestsSummaryAction::Export + : LowerTypeTestsSummaryAction::None, + Summary)); if (OptLevel != 0) addLateLTOOptimizationPasses(PM); |

