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
62 lines
1.7 KiB
LLVM
62 lines
1.7 KiB
LLVM
; RUN: opt < %s -passes=inline -inline-remark-attribute --inline-threshold=0 -S | FileCheck %s
|
|
|
|
; Test that the inliner adds inline remark attributes to non-inlined callsites.
|
|
|
|
declare void @ext();
|
|
|
|
define void @foo() {
|
|
call void @bar(i1 true)
|
|
ret void
|
|
}
|
|
|
|
define void @bar(i1 %p) {
|
|
br i1 %p, label %bb1, label %bb2
|
|
|
|
bb1:
|
|
call void @foo()
|
|
call void @ext()
|
|
ret void
|
|
|
|
bb2:
|
|
call void @bar(i1 true)
|
|
ret void
|
|
}
|
|
|
|
;; Test 1 - Add different inline remarks to similar callsites.
|
|
define void @test1() {
|
|
; CHECK-LABEL: @test1
|
|
; CHECK-NEXT: call void @bar(i1 true) [[ATTR1:#[0-9]+]]
|
|
; CHECK-NEXT: call void @bar(i1 false) [[ATTR2:#[0-9]+]]
|
|
call void @bar(i1 true)
|
|
call void @bar(i1 false)
|
|
ret void
|
|
}
|
|
|
|
define void @noop() {
|
|
ret void
|
|
}
|
|
|
|
;; Test 2 - Printed InlineResult messages are followed by InlineCost.
|
|
define void @test2(ptr) {
|
|
; CHECK-LABEL: @test2
|
|
; CHECK-NEXT: call void @noop() [[ATTR3:#[0-9]+]] [ "CUSTOM_OPERAND_BUNDLE"() ]
|
|
; CHECK-NEXT: ret void
|
|
call void @noop() ; extepected to be inlined
|
|
call void @noop() [ "CUSTOM_OPERAND_BUNDLE"() ] ; cannot be inlined because of unsupported operand bundle
|
|
ret void
|
|
}
|
|
|
|
;; Test 3 - InlineResult messages come from llvm::isInlineViable()
|
|
define void @test3() {
|
|
; CHECK-LABEL: @test3
|
|
; CHECK-NEXT: call void @test3() [[ATTR4:#[0-9]+]]
|
|
; CHECK-NEXT: ret void
|
|
call void @test3() alwaysinline
|
|
ret void
|
|
}
|
|
|
|
; CHECK: attributes [[ATTR1]] = { "inline-remark"="(cost=25, threshold=0)" }
|
|
; CHECK: attributes [[ATTR2]] = { "inline-remark"="(cost=never): recursive" }
|
|
; CHECK: attributes [[ATTR3]] = { "inline-remark"="unsupported operand bundle; (cost={{.*}}, threshold={{.*}})" }
|
|
; CHECK: attributes [[ATTR4]] = { alwaysinline "inline-remark"="(cost=never): recursive call" }
|