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
117 lines
3.6 KiB
Plaintext
117 lines
3.6 KiB
Plaintext
// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
|
|
|
|
// Static relocation model, ELF, external definition: dso_local
|
|
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "",
|
|
fir.relocation_model = 0 : i32,
|
|
llvm.target_triple = "x86_64-unknown-linux-gnu"} {
|
|
fir.global @static_def : i32 {
|
|
%0 = fir.zero_bits i32
|
|
fir.has_value %0 : i32
|
|
}
|
|
}
|
|
// CHECK: llvm.mlir.global external @static_def()
|
|
// CHECK-SAME: dso_local
|
|
|
|
// -----
|
|
|
|
// PIC + PIE, ELF, external definition: dso_local
|
|
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "",
|
|
fir.relocation_model = 1 : i32, fir.is_pie,
|
|
llvm.target_triple = "x86_64-unknown-linux-gnu"} {
|
|
fir.global @pie_def : i32 {
|
|
%0 = fir.zero_bits i32
|
|
fir.has_value %0 : i32
|
|
}
|
|
}
|
|
// CHECK: llvm.mlir.global external @pie_def()
|
|
// CHECK-SAME: dso_local
|
|
|
|
// -----
|
|
|
|
// PIC without PIE, ELF, external definition: no dso_local
|
|
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "",
|
|
fir.relocation_model = 1 : i32,
|
|
llvm.target_triple = "x86_64-unknown-linux-gnu"} {
|
|
fir.global @pic_def : i32 {
|
|
%0 = fir.zero_bits i32
|
|
fir.has_value %0 : i32
|
|
}
|
|
}
|
|
// CHECK: llvm.mlir.global external @pic_def()
|
|
// CHECK-NOT: dso_local
|
|
// CHECK-SAME: : i32
|
|
|
|
// -----
|
|
|
|
// Static relocation model, ELF, declaration only: no dso_local
|
|
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "",
|
|
fir.relocation_model = 0 : i32,
|
|
llvm.target_triple = "x86_64-unknown-linux-gnu"} {
|
|
fir.global @decl_only : i32
|
|
}
|
|
// CHECK: llvm.mlir.global external @decl_only()
|
|
// CHECK-NOT: dso_local
|
|
// CHECK-SAME: : i32
|
|
|
|
// -----
|
|
|
|
// Static relocation model, ELF, internal linkage: no dso_local from this path
|
|
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "",
|
|
fir.relocation_model = 0 : i32,
|
|
llvm.target_triple = "x86_64-unknown-linux-gnu"} {
|
|
fir.global internal @internal_var : i32 {
|
|
%0 = fir.zero_bits i32
|
|
fir.has_value %0 : i32
|
|
}
|
|
}
|
|
// CHECK: llvm.mlir.global internal @internal_var()
|
|
// CHECK-NOT: dso_local
|
|
// CHECK-SAME: : i32
|
|
|
|
// -----
|
|
|
|
// Static relocation model, ELF, linkonce: no dso_local from this path
|
|
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "",
|
|
fir.relocation_model = 0 : i32,
|
|
llvm.target_triple = "x86_64-unknown-linux-gnu"} {
|
|
fir.global linkonce @linkonce_str constant : !fir.char<1,5> {
|
|
%0 = fir.string_lit "hello"(5) : !fir.char<1,5>
|
|
fir.has_value %0 : !fir.char<1,5>
|
|
}
|
|
}
|
|
// CHECK: llvm.mlir.global linkonce constant @linkonce_str()
|
|
// CHECK-NOT: dso_local
|
|
// CHECK-SAME: : !llvm.array<5 x i8>
|
|
|
|
// -----
|
|
|
|
// Static relocation model, ELF, CUDA constant variable: no dso_local
|
|
// CUDA device/constant/managed variables need GOT indirection because the
|
|
// CUDA runtime interposes on these symbols via cudaRegisterVar.
|
|
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "",
|
|
fir.relocation_model = 0 : i32,
|
|
llvm.target_triple = "x86_64-unknown-linux-gnu"} {
|
|
fir.global @cuda_constant {data_attr = #cuf.cuda<constant>} : i32 {
|
|
%0 = arith.constant 4 : i32
|
|
fir.has_value %0 : i32
|
|
}
|
|
}
|
|
// CHECK: llvm.mlir.global external @cuda_constant()
|
|
// CHECK-NOT: dso_local
|
|
// CHECK-SAME: : i32
|
|
|
|
// -----
|
|
|
|
// Static relocation model, ELF, CUDA device variable: no dso_local
|
|
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "",
|
|
fir.relocation_model = 0 : i32,
|
|
llvm.target_triple = "x86_64-unknown-linux-gnu"} {
|
|
fir.global @cuda_device {data_attr = #cuf.cuda<device>} : i32 {
|
|
%0 = fir.zero_bits i32
|
|
fir.has_value %0 : i32
|
|
}
|
|
}
|
|
// CHECK: llvm.mlir.global external @cuda_device()
|
|
// CHECK-NOT: dso_local
|
|
// CHECK-SAME: : i32
|