Author: Florian Hahn Date: 2020-12-15T14:46:52Z New Revision: 7ea3932ab1def0f5e86ac745bef0d3de09e8845f
URL: https://github.com/llvm/llvm-project/commit/7ea3932ab1def0f5e86ac745bef0d3de09e8845f DIFF: https://github.com/llvm/llvm-project/commit/7ea3932ab1def0f5e86ac745bef0d3de09e8845f.diff LOG: [AnnotationRemarks] Also generate annotation remarks when using -O0. The AnnotationRemarks pass is already run at the end of the module pipeline. This patch also adds it before bailing out for -O0, so remarks are also generated with -O0. Added: Modified: llvm/lib/Transforms/IPO/PassManagerBuilder.cpp llvm/test/Other/opt-O0-pipeline.ll Removed: ################################################################################ diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp index 574527763a9c..8dd30ef82bc3 100644 --- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp +++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp @@ -569,6 +569,8 @@ void PassManagerBuilder::populateModulePassManager( // new unnamed globals. MPM.add(createNameAnonGlobalPass()); } + + MPM.add(createAnnotationRemarksLegacyPass()); return; } diff --git a/llvm/test/Other/opt-O0-pipeline.ll b/llvm/test/Other/opt-O0-pipeline.ll index 86677c683c42..80ab608b05ce 100644 --- a/llvm/test/Other/opt-O0-pipeline.ll +++ b/llvm/test/Other/opt-O0-pipeline.ll @@ -25,6 +25,7 @@ ; CHECK-NEXT: Inliner for always_inline functions ; A No-Op Barrier Pass ; CHECK: FunctionPass Manager +; CHECK-NEXT: Annotation Remarks ; CHECK-NEXT: Module Verifier ; CHECK-NEXT: Bitcode Writer _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits