llvm-project/clang/test/CodeGen/pgo-force-function-attrs.ll
Arthur Eubanks fb14f1df54
[PGO][Pipeline] Enable PGOForceFunctionAttrs in PGO optimization pipelines (#106790)
Remove flag that turns on the PGOForceFunctionAttrs pass and always add
it to default pipelines when using PGO.

This is NFC by default since PGOOpt->ColdOptType is by default
ColdFuncOpt::Default.

Remove -O2 RUN line in basic.ll since we now have the pipeline tests.
2024-09-03 10:35:08 -07:00

13 lines
572 B
LLVM

; RUN: %clang_cc1 -O2 -mllvm -pgo-cold-func-opt=optsize -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -emit-llvm -o - | FileCheck %s --check-prefix=OPTSIZE
; Check that no profile means no optsize
; RUN: %clang_cc1 -O2 -mllvm -pgo-cold-func-opt=optsize %s -emit-llvm -o - | FileCheck %s --check-prefix=NONE
; Check that no -pgo-cold-func-opt=optsize means no optsize
; RUN: %clang_cc1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -emit-llvm -o - | FileCheck %s --check-prefix=NONE
; NONE-NOT: optsize
; OPTSIZE: optsize
define void @f() cold {
ret void
}