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
58 lines
2.0 KiB
LLVM
58 lines
2.0 KiB
LLVM
; Do setup work for all below tests: generate bitcode and combined index
|
|
; RUN: opt -module-summary %s -o %t.bc -bitcode-mdindex-threshold=0
|
|
; RUN: opt -module-summary %p/Inputs/lazyload_metadata.ll -o %t2.bc -bitcode-mdindex-threshold=0
|
|
; RUN: llvm-lto -thinlto-action=thinlink -o %t3.bc %t.bc %t2.bc
|
|
; REQUIRES: asserts
|
|
|
|
; Check that importing @globalfunc1 does not trigger loading all the global
|
|
; metadata for @globalfunc2 and @globalfunc3
|
|
|
|
; RUN: llvm-lto -thinlto-action=import %t2.bc -thinlto-index=%t3.bc -stats 2> %t4.txt
|
|
; RUN: llvm-lto -thinlto-action=import %t2.bc -thinlto-index=%t3.bc -stats -disable-ondemand-mds-loading 2> %t5.txt
|
|
; RUN: cat %t4.txt %t5.txt | FileCheck %s
|
|
|
|
; Check llvm-lto call with lazy loading enabled
|
|
; CHECK: [[#LAZY_RECORDS:]] bitcode-reader - Number of Metadata records loaded
|
|
; CHECK: 2 bitcode-reader - Number of MDStrings loaded
|
|
|
|
; Check llvm-lto call with lazy loading disabled
|
|
; CHECK: [[#LAZY_RECORDS+9]] bitcode-reader - Number of Metadata records loaded
|
|
; CHECK: 7 bitcode-reader - Number of MDStrings loaded
|
|
|
|
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-apple-macosx10.11.0"
|
|
|
|
define void @globalfunc1(i32 %arg) {
|
|
%x = call i1 @llvm.type.test(ptr undef, metadata !"typeid1")
|
|
%tmp = add i32 %arg, 0, !metadata !2
|
|
ret void
|
|
}
|
|
|
|
; We need two functions here that will both reference the same metadata.
|
|
; This is to force the metadata to be emitted in the global metadata block and
|
|
; not in the function specific metadata.
|
|
; These function are not imported and so we don't want to load their metadata.
|
|
|
|
define void @globalfunc2(i32 %arg) {
|
|
%x = call i1 @llvm.type.test(ptr undef, metadata !"typeid1")
|
|
%tmp = add i32 %arg, 0, !metadata !1
|
|
ret void
|
|
}
|
|
|
|
define void @globalfunc3(i32 %arg) {
|
|
%tmp = add i32 %arg, 0, !metadata !1
|
|
ret void
|
|
}
|
|
|
|
declare i1 @llvm.type.test(ptr %ptr, metadata %bitset) nounwind readnone
|
|
|
|
!1 = !{!2, !3, !4, !5, !6, !7, !8, !9}
|
|
!2 = !{!"Hello World"}
|
|
!3 = !{!"3"}
|
|
!4 = !{!"4"}
|
|
!5 = !{!"5"}
|
|
!6 = !{!9}
|
|
!7 = !{!"7"}
|
|
!8 = !{!"8"}
|
|
!9 = !{!6}
|