CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
51 lines
1.6 KiB
LLVM
51 lines
1.6 KiB
LLVM
; RUN: opt < %s -passes='require<profile-summary>,cgscc(inline)' -S | FileCheck %s
|
|
|
|
; This tests that the function count of two callees get correctly updated after
|
|
; they have been inlined into two back-to-back callsites in a single basic block
|
|
; in the caller. The callees have the alwaysinline attribute and so they get
|
|
; inlined both with the regular inliner pass and the always inline pass. In
|
|
; both cases, the new count of each callee is the original count minus callsite
|
|
; count which is 200 (since the caller's entry count is 400 and the block
|
|
; containing the calls have a relative block frequency of 0.5).
|
|
|
|
; CHECK: @callee1(i32 %n) #0 !prof [[COUNT1:![0-9]+]]
|
|
define i32 @callee1(i32 %n) #0 !prof !1 {
|
|
%cond = icmp sle i32 %n, 10
|
|
br i1 %cond, label %cond_true, label %cond_false
|
|
|
|
cond_true:
|
|
%r1 = add i32 %n, 1
|
|
ret i32 %r1
|
|
cond_false:
|
|
%r2 = add i32 %n, 2
|
|
ret i32 %r2
|
|
}
|
|
|
|
; CHECK: @callee2(i32 %n) #0 !prof [[COUNT2:![0-9]+]]
|
|
define i32 @callee2(i32 %n) #0 !prof !2 {
|
|
%r1 = add i32 %n, 1
|
|
ret i32 %r1
|
|
}
|
|
|
|
define i32 @caller(i32 %n) !prof !3 {
|
|
%cond = icmp sle i32 %n, 100
|
|
br i1 %cond, label %cond_true, label %cond_false
|
|
|
|
cond_true:
|
|
%i = call i32 @callee1(i32 %n)
|
|
%j = call i32 @callee2(i32 %i)
|
|
ret i32 %j
|
|
cond_false:
|
|
ret i32 0
|
|
}
|
|
|
|
!llvm.module.flags = !{!0}
|
|
; CHECK: [[COUNT1]] = !{!"function_entry_count", i64 800}
|
|
; CHECK: [[COUNT2]] = !{!"function_entry_count", i64 1800}
|
|
!0 = !{i32 1, !"MaxFunctionCount", i32 1000}
|
|
!1 = !{!"function_entry_count", i64 1000}
|
|
!2 = !{!"function_entry_count", i64 2000}
|
|
!3 = !{!"function_entry_count", i64 400}
|
|
attributes #0 = { alwaysinline }
|
|
|