Skip to content

Commit da22487

Browse files
committed
[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.
1 parent 0115cb1 commit da22487

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

llvm/lib/Transforms/IPO/PassManagerBuilder.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,8 @@ void PassManagerBuilder::populateModulePassManager(
547547
// new unnamed globals.
548548
MPM.add(createNameAnonGlobalPass());
549549
}
550+
551+
MPM.add(createAnnotationRemarksLegacyPass());
550552
return;
551553
}
552554

llvm/test/Other/opt-O0-pipeline.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
; CHECK-NEXT: Inliner for always_inline functions
2323
; A No-Op Barrier Pass
2424
; CHECK: FunctionPass Manager
25+
; CHECK-NEXT: Annotation Remarks
2526
; CHECK-NEXT: Module Verifier
2627
; CHECK-NEXT: Bitcode Writer
2728

0 commit comments

Comments
 (0)