Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/SampleProfile/inline-callee-update.ll
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

77 lines
2.8 KiB
LLVM

; Make sure Import GUID list for ThinLTO properly maintained while update function's entry count for inlining
; RUN: opt < %s -passes='thinlto-pre-link<O2>' -pgo-kind=pgo-sample-use-pipeline -sample-profile-file=%S/Inputs/inline-callee-update.prof -S | FileCheck %s
@y = global ptr null, align 8
@z = global ptr null, align 8
; CHECK: define ptr @sample_loader_inlinee() {{.*}} !prof ![[ENTRY:[0-9]+]]
define ptr @sample_loader_inlinee() #0 !dbg !3 {
bb:
%tmp = call ptr @direct_leaf_func(ptr null), !dbg !4
%cmp = icmp ne ptr %tmp, null
br i1 %cmp, label %then, label %else
then: ; preds = %bb
%tmp1 = load ptr, ptr @z, align 8, !dbg !5
%tmp2 = call ptr %tmp1(), !dbg !5
ret ptr %tmp2
else: ; preds = %bb
ret ptr null
}
; CHECK: define ptr @cgscc_inlinee() {{.*}} !prof ![[ENTRY:[0-9]+]]
define ptr @cgscc_inlinee() #0 !dbg !6 {
bb:
%tmp = call ptr @direct_leaf_func(ptr null), !dbg !7
%cmp = icmp ne ptr %tmp, null
br i1 %cmp, label %then, label %else
then: ; preds = %bb
%tmp1 = load ptr, ptr @y, align 8, !dbg !8
%tmp2 = call ptr %tmp1(), !dbg !8
ret ptr %tmp2
else: ; preds = %bb
ret ptr null
}
define ptr @test_sample_loader_inline(ptr %arg) #0 !dbg !9 {
bb:
%tmp = call ptr @sample_loader_inlinee(), !dbg !10
ret ptr %tmp
}
define ptr @test_cgscc_inline(ptr %arg) #0 !dbg !11 {
bb:
%tmp = call ptr @cgscc_inlinee(), !dbg !12
ret ptr %tmp
}
declare ptr @direct_leaf_func(ptr)
attributes #0 = {"use-sample-profile"}
!llvm.dbg.cu = !{!0}
!13 = !{null}
!14 = !DISubroutineType(types: !13)
!llvm.module.flags = !{!2}
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug)
!1 = !DIFile(filename: "test.cc", directory: "/")
!2 = !{i32 2, !"Debug Info Version", i32 3}
!3 = distinct !DISubprogram(name: "sample_loader_inlinee", scope: !1, file: !1, line: 11, spFlags: DISPFlagDefinition, type: !14, unit: !0)
!4 = !DILocation(line: 12, scope: !3)
!5 = !DILocation(line: 13, scope: !3)
!6 = distinct !DISubprogram(name: "cgscc_inlinee", scope: !1, file: !1, line: 31, spFlags: DISPFlagDefinition, type: !14, unit: !0)
!7 = !DILocation(line: 32, scope: !6)
!8 = !DILocation(line: 33, scope: !6)
!9 = distinct !DISubprogram(name: "test_sample_loader_inline", scope: !1, file: !1, line: 3, spFlags: DISPFlagDefinition, type: !14, unit: !0)
!10 = !DILocation(line: 4, scope: !9)
!11 = distinct !DISubprogram(name: "test_cgscc_inline", scope: !1, file: !1, line: 20, spFlags: DISPFlagDefinition, type: !14, unit: !0)
!12 = !DILocation(line: 21, scope: !11)
; Make sure the ImportGUID stays with entry count metadata for ThinLTO-PreLink
; CHECK: ![[ENTRY]] = !{!"function_entry_count", i64 1, i64 -9171813444624716006}