mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-01 21:04:04 -04:00
0bbeef3cb1
Add PGO support at -O0 in the experimental new pass manager to sync the
behavior of the legacy pass manager.
Also change the test of gcc-flag-compatibility.c for more complete test:
(1) change the match string to "profc" and "profd" to ensure the
instrumentation is happening.
(2) add IR format proftext so that PGO use compilation is tested.
Differential Revision: https://reviews.llvm.org/D64029
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367628 91177308-0d34-0410-b5e6-96231b3b80d8
22 lines
1.3 KiB
LLVM
22 lines
1.3 KiB
LLVM
; RUN: opt -debug-pass-manager -passes='default<O0>' -pgo-kind=pgo-instr-gen-pipeline -profile-file='temp' %s 2>&1 |FileCheck %s --check-prefixes=GEN
|
|
; RUN: llvm-profdata merge %S/Inputs/new-pm-pgo.proftext -o %t.profdata
|
|
; RUN: opt -debug-pass-manager -passes='default<O0>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t.profdata' %s 2>&1 |FileCheck %s --check-prefixes=USE_DEFAULT,USE
|
|
; RUN: opt -debug-pass-manager -passes='thinlto-pre-link<O0>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t.profdata' %s 2>&1 \
|
|
; RUN: |FileCheck %s --check-prefixes=USE_PRE_LINK,USE
|
|
; RUN: opt -debug-pass-manager -passes='lto-pre-link<O0>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t.profdata' %s 2>&1 \
|
|
; RUN: |FileCheck %s --check-prefixes=USE_PRE_LINK,USE
|
|
; RUN: opt -debug-pass-manager -passes='thinlto<O0>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t.profdata' %s 2>&1 \
|
|
; RUN: |FileCheck %s --check-prefixes=USE_POST_LINK,USE
|
|
|
|
;
|
|
; GEN: Running pass: PGOInstrumentationGen
|
|
; USE_DEFAULT: Running pass: PGOInstrumentationUse
|
|
; USE_PRE_LINK: Running pass: PGOInstrumentationUse
|
|
; USE_POST_LINK-NOT: Running pass: PGOInstrumentationUse
|
|
; USE-NOT: Running pass: PGOIndirectCallPromotion
|
|
; USE-NOT: Running pass: PGOMemOPSizeOpt
|
|
|
|
define void @foo() {
|
|
ret void
|
|
}
|