Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PGO] Enable preinline and cleanup when optimize for size
Differential Revision: https://reviews.llvm.org/D91673
- Loading branch information
Showing
5 changed files
with
85 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
; RUN: opt -disable-verify -debug-pass-manager -pgo-kind=pgo-instr-gen-pipeline -passes='default<Os>' -S %s 2>&1 | FileCheck %s --check-prefixes=CHECK-Osz | ||
; RUN: opt -disable-verify -debug-pass-manager -pgo-kind=pgo-instr-gen-pipeline -passes='default<Oz>' -S %s 2>&1 | FileCheck %s --check-prefixes=CHECK-Osz | ||
|
||
; CHECK-Osz: Running pass: ModuleInlinerWrapperPass | ||
; CHECK-Osz-NEXT: Running analysis: InlineAdvisorAnalysis | ||
; CHECK-Osz-NEXT: Starting {{.*}}Module pass manager run. | ||
; CHECK-Osz-NEXT: Running analysis: InnerAnalysisManagerProxy | ||
; CHECK-Osz-NEXT: Running analysis: LazyCallGraphAnalysis | ||
; CHECK-Osz-NEXT: Running analysis: FunctionAnalysisManagerCGSCCProxy on (foo) | ||
; CHECK-Osz-NEXT: Running analysis: OuterAnalysisManagerProxy | ||
; CHECK-Osz-NEXT: Starting CGSCC pass manager run. | ||
; CHECK-Osz-NEXT: Running pass: InlinerPass on (foo) | ||
; CHECK-Osz-NEXT: Running pass: SROA on foo | ||
; CHECK-Osz-NEXT: Running pass: EarlyCSEPass on foo | ||
; CHECK-Osz-NEXT: Running pass: SimplifyCFGPass on foo | ||
; CHECK-Osz-NEXT: Running pass: InstCombinePass on foo | ||
; CHECK-Osz-NEXT: Finished CGSCC pass manager run. | ||
; CHECK-Osz-NEXT: Finished {{.*}}Module pass manager run. | ||
; CHECK-Osz-NEXT: Running pass: GlobalDCEPass | ||
; CHECK-Osz-NEXT: Running pass: PGOInstrumentationGen | ||
|
||
define void @foo() { | ||
ret void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
; RUN: opt -disable-verify -enable-new-pm=0 -pgo-kind=pgo-instr-gen-pipeline -mtriple=x86_64-- -Os -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-Osz | ||
; RUN: opt -disable-verify -enable-new-pm=0 -pgo-kind=pgo-instr-gen-pipeline -mtriple=x86_64-- -Oz -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-Osz | ||
|
||
|
||
; CHECK-Osz: CallGraph Construction | ||
; CHECK-Osz-NEXT: Call Graph SCC Pass Manager | ||
; CHECK-Osz-NEXT: Function Integration/Inlining | ||
; CHECK-Osz-NEXT: FunctionPass Manager | ||
; CHECK-Osz-NEXT: Dominator Tree Construction | ||
; CHECK-Osz-NEXT: SROA | ||
; CHECK-Osz-NEXT: Early CSE | ||
; CHECK-Osz-NEXT: Simplify the CFG | ||
; CHECK-Osz-NEXT: Dominator Tree Construction | ||
; CHECK-Osz-NEXT: Basic Alias Analysis (stateless AA impl) | ||
; CHECK-Osz-NEXT: Function Alias Analysis Results | ||
; CHECK-Osz-NEXT: Natural Loop Information | ||
; CHECK-Osz-NEXT: Lazy Branch Probability Analysis | ||
; CHECK-Osz-NEXT: Lazy Block Frequency Analysis | ||
; CHECK-Osz-NEXT: Optimization Remark Emitter | ||
; CHECK-Osz-NEXT: Combine redundant instructions | ||
|
||
define void @foo() { | ||
ret void | ||
} |