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
97 lines
3.7 KiB
LLVM
97 lines
3.7 KiB
LLVM
; RUN: opt -S -passes=inline -inliner-function-import-stats=basic < %s 2>&1 | FileCheck %s --check-prefixes=CHECK-BASIC,CHECK
|
|
; RUN: opt -S -passes=inline -inliner-function-import-stats=verbose < %s 2>&1 | FileCheck %s --check-prefixes="CHECK-VERBOSE",CHECK
|
|
|
|
; RUN: opt -S -passes=inliner-wrapper-no-mandatory-first -inliner-function-import-stats=basic < %s 2>&1 | FileCheck %s --check-prefixes=CHECK-BASIC,CHECK
|
|
; RUN: opt -S -passes=inliner-wrapper-no-mandatory-first -inliner-function-import-stats=verbose < %s 2>&1 | FileCheck %s --check-prefixes="CHECK-VERBOSE",CHECK
|
|
|
|
; RUN: opt -S -passes=inliner-wrapper -inliner-function-import-stats=basic < %s 2>&1 | FileCheck %s --check-prefixes=CHECK-BASIC,CHECK
|
|
; RUN: opt -S -passes=inliner-wrapper -inliner-function-import-stats=verbose < %s 2>&1 | FileCheck %s --check-prefixes=CHECK-VERBOSE,CHECK
|
|
|
|
; CHECK: ------- Dumping inliner stats for [<stdin>] -------
|
|
; CHECK-BASIC-NOT: -- List of inlined functions:
|
|
; CHECK-BASIC-NOT: -- Inlined not imported function
|
|
; CHECK-VERBOSE: -- List of inlined functions:
|
|
; CHECK-VERBOSE: Inlined not imported function [internal2]: #inlines = 6, #inlines_to_importing_module = 2
|
|
; CHECK-VERBOSE: Inlined imported function [external2]: #inlines = 4, #inlines_to_importing_module = 1
|
|
; CHECK-VERBOSE: Inlined imported function [external1]: #inlines = 3, #inlines_to_importing_module = 2
|
|
; CHECK-VERBOSE: Inlined imported function [external5]: #inlines = 1, #inlines_to_importing_module = 1
|
|
; CHECK-VERBOSE: Inlined imported function [external3]: #inlines = 1, #inlines_to_importing_module = 0
|
|
|
|
; CHECK: -- Summary:
|
|
; CHECK: All functions: 10, imported functions: 7
|
|
; CHECK: inlined functions: 5 [50% of all functions]
|
|
; CHECK: imported functions inlined anywhere: 4 [57.14% of imported functions]
|
|
; CHECK: imported functions inlined into importing module: 3 [42.86% of imported functions], remaining: 4 [57.14% of imported functions]
|
|
; CHECK: non-imported functions inlined anywhere: 1 [33.33% of non-imported functions]
|
|
; CHECK: non-imported functions inlined into importing module: 1 [33.33% of non-imported functions]
|
|
|
|
define void @internal() {
|
|
call fastcc void @external1()
|
|
call fastcc void @internal2()
|
|
call coldcc void @external_big()
|
|
ret void
|
|
}
|
|
|
|
define void @internal2() alwaysinline {
|
|
ret void
|
|
}
|
|
|
|
define void @internal3() {
|
|
call fastcc void @external1()
|
|
call fastcc void @external5()
|
|
ret void
|
|
}
|
|
|
|
declare void @external_decl()
|
|
|
|
define void @external1() alwaysinline !thinlto_src_module !0 !thinlto_src_file !1 {
|
|
call fastcc void @internal2()
|
|
call fastcc void @external2();
|
|
call void @external_decl();
|
|
ret void
|
|
}
|
|
|
|
define void @external2() alwaysinline !thinlto_src_module !1 {
|
|
ret void
|
|
}
|
|
|
|
define void @external3() alwaysinline !thinlto_src_module !1 {
|
|
ret void
|
|
}
|
|
|
|
define void @external4() !thinlto_src_module !1 {
|
|
call fastcc void @external1()
|
|
call fastcc void @external2()
|
|
ret void
|
|
}
|
|
|
|
define void @external5() !thinlto_src_module !1 {
|
|
ret void
|
|
}
|
|
|
|
; Assume big piece of code here. This function won't be inlined, so all the
|
|
; inlined function it will have won't affect real inlines.
|
|
define void @external_big() noinline !thinlto_src_module !1 {
|
|
; CHECK-NOT: call fastcc void @internal2()
|
|
call fastcc void @internal2()
|
|
call fastcc void @internal2()
|
|
call fastcc void @internal2()
|
|
call fastcc void @internal2()
|
|
|
|
; CHECK-NOT: call fastcc void @external2()
|
|
call fastcc void @external2()
|
|
call fastcc void @external2()
|
|
; CHECK-NOT: call fastcc void @external3()
|
|
call fastcc void @external3()
|
|
ret void
|
|
}
|
|
|
|
; It should not be imported, but it should not break anything.
|
|
define void @external_notcalled() !thinlto_src_module !0 !thinlto_src_file !1 {
|
|
call void @external_notcalled()
|
|
ret void
|
|
}
|
|
|
|
!0 = !{!"file.cc"}
|
|
!1 = !{!"other.cc"}
|