brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 8c22e56 Raw
33 lines · plain
1; For SamplePGO, if -profile-sample-accurate is specified, cold callsite2; heuristics should be honored if the caller has no profile.3 4; RUN: opt -S %s -passes='sample-profile,cgscc(inline)' -sample-profile-file=%S/Inputs/inline.prof -inline-cold-callsite-threshold=0 | FileCheck %s5; RUN: opt -S %s -passes='sample-profile,cgscc(inline)' -sample-profile-file=%S/Inputs/inline.prof -profile-sample-accurate -inline-cold-callsite-threshold=0 | FileCheck %s --check-prefix ACCURATE6 7declare void @extern()8define void @callee() #1 {9  call void @extern()10  ret void11}12 13define void @caller(i32 %y1) #1 {14; CHECK-LABEL: @caller15; CHECK-NOT: call void @callee16; ACCURATE-LABEL: @caller17; ACCURATE: call void @callee18  call void @callee()19  ret void20}21 22define void @caller_accurate(i32 %y1) #0 {23; CHECK-LABEL: @caller_accurate24; CHECK: call void @callee25; ACCURATE-LABEL: @caller_accurate26; ACCURATE: call void @callee27  call void @callee()28  ret void29}30 31attributes #0 = { "profile-sample-accurate" "use-sample-profile" }32attributes #1 = { "use-sample-profile" }33