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
4.5 KiB
Plaintext
117 lines
4.5 KiB
Plaintext
;; Basic FatLTO tests.
|
|
; REQUIRES: x86
|
|
|
|
; RUN: rm -rf %t && split-file %s %t && cd %t
|
|
|
|
;; Ensure that input files contain .llvm.lto section.
|
|
; RUN: llc a-LTO.ll --filetype=obj -o a-fatLTO.o --relocation-model=pic
|
|
; RUN: opt < a-LTO.ll --module-summary -o a-fatLTO.bc
|
|
; RUN: llvm-objcopy --add-section=.llvm.lto=a-fatLTO.bc --set-section-flags=.llvm.lto=exclude --set-section-type=.llvm.lto=0x6fff4c0c a-fatLTO.o
|
|
|
|
; RUN: llc main-LTO.ll --filetype=obj -o main-fatLTO.o --relocation-model=pic
|
|
; RUN: opt < main-LTO.ll --module-summary -o main-fatLTO.bc
|
|
; RUN: llvm-objcopy --add-section=.llvm.lto=main-fatLTO.bc --set-section-flags=.llvm.lto=exclude --set-section-type=.llvm.lto=0x6fff4c0c main-fatLTO.o
|
|
|
|
; RUN: llvm-readelf -S a-fatLTO.o | FileCheck --check-prefix=HAS_LLVM_LTO %s
|
|
; RUN: llvm-readelf -S main-fatLTO.o | FileCheck --check-prefix=HAS_LLVM_LTO %s
|
|
|
|
;; Make sure that the section flags are set correctly
|
|
; HAS_LLVM_LTO: Name Type Address Off Size ES Flg Lk Inf Al
|
|
; HAS_LLVM_LTO: .llvm.lto LLVM_LTO {{.*}} 00 WE 0 0 1
|
|
|
|
;; Final executable should not have .llvm.lto section no matter what the target is.
|
|
; RUN: ld.lld -o foo-fatLTO a-fatLTO.o main-fatLTO.o --fat-lto-objects
|
|
; RUN: llvm-readelf -S foo-fatLTO | FileCheck --check-prefix=CHECK-LTO-TARGET %s
|
|
|
|
;; Check that fat objects work w/ --start-lib.
|
|
; RUN: ld.lld -o foo-fatLTO.start_lib --start-lib a-fatLTO.o main-fatLTO.o --fat-lto-objects
|
|
; RUN: llvm-readelf -S foo-fatLTO.start_lib | FileCheck --check-prefix=CHECK-LTO-TARGET %s
|
|
|
|
;; Check if .llvm.lto section gets aggregated in LTO target.
|
|
; CHECK-LTO-TARGET: Name Type Address Off Size ES Flg Lk Inf Al
|
|
; CHECK-LTO-TARGET-NOT: .llvm.lto
|
|
|
|
;; Final executable should not have .llvm.lto section no matter what the target is.
|
|
; RUN: ld.lld -o foo-fatNoLTO a-fatLTO.o %/t/main-fatLTO.o
|
|
; RUN: llvm-readelf -S foo-fatNoLTO | FileCheck --check-prefix=CHECK-NON-LTO-TARGET %s
|
|
|
|
;; Check if .llvm.lto section gets aggregated in non-LTO target.
|
|
; CHECK-NON-LTO-TARGET: Name Type Address Off Size ES Flg Lk Inf Al
|
|
; CHECK-NON-LTO-TARGET-NOT: .llvm.lto
|
|
|
|
;; Check if the LTO target executable produced from FatLTO object file is
|
|
;; identical to the one produced from LTO modules.
|
|
; RUN: opt < a-LTO.ll --module-summary -o a-LTO.bc
|
|
; RUN: opt < main-LTO.ll --module-summary -o main-LTO.bc
|
|
; RUN: ld.lld -o foo-LTO a-LTO.bc main-LTO.bc
|
|
; RUN: cmp foo-fatLTO foo-LTO
|
|
|
|
;; Check if the no-LTO target executable produced from FatLTO object file is
|
|
;; identical to the one produced from regular object files.
|
|
; RUN: llc a-LTO.ll --filetype=obj -o a.o
|
|
; RUN: llc main-LTO.ll --filetype=obj -o main.o
|
|
; RUN: ld.lld -o foo-noLTO a.o main.o
|
|
; RUN: cmp foo-fatNoLTO foo-noLTO
|
|
|
|
;; Check archive support.
|
|
; RUN: llvm-ar rcs a.a a-fatLTO.o
|
|
; RUN: ld.lld -o foo-fatLTO.archive a.a main-LTO.bc --fat-lto-objects
|
|
; RUN: cmp foo-fatLTO.archive foo-LTO
|
|
|
|
;; Test FatLTO works with relocatable links using PIC objects, and that
|
|
;; SHT_LLVM_LTO sections are discarded.
|
|
; RUN: llvm-ar rcs fatLTO-pic.a a-fatLTO.o main-fatLTO.o
|
|
; RUN: llvm-readelf -S fatLTO-pic.a | FileCheck --check-prefix=HAS_LLVM_LTO %s
|
|
|
|
; RUN: ld.lld --whole-archive fatLTO-pic.a -r -o fatLTO-pic-relocatable.o
|
|
; RUN: llvm-readelf -S fatLTO-pic-relocatable.o | FileCheck --check-prefix=CHECK-NON-LTO-TARGET %s
|
|
|
|
;--- a-LTO.ll
|
|
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
; Function Attrs: noinline nounwind uwtable
|
|
define dso_local i32 @_start() #0 {
|
|
entry:
|
|
ret i32 0
|
|
}
|
|
|
|
attributes #0 = { noinline nounwind uwtable }
|
|
|
|
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6}
|
|
|
|
!0 = !{i32 1, !"wchar_size", i32 4}
|
|
!1 = !{i32 7, !"PIC Level", i32 2}
|
|
!2 = !{i32 7, !"PIE Level", i32 2}
|
|
!3 = !{i32 7, !"uwtable", i32 2}
|
|
!4 = !{i32 7, !"frame-pointer", i32 2}
|
|
!5 = !{i32 1, !"ThinLTO", i32 0}
|
|
!6 = !{i32 1, !"EnableSplitLTOUnit", i32 1}
|
|
|
|
;--- main-LTO.ll
|
|
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
; Function Attrs: noinline nounwind uwtable
|
|
define dso_local i32 @main() #0 {
|
|
entry:
|
|
%retval = alloca i32, align 4
|
|
store i32 0, ptr %retval, align 4
|
|
%call = call i32 (...) @_start()
|
|
ret i32 %call
|
|
}
|
|
|
|
declare i32 @_start(...)
|
|
|
|
attributes #0 = { noinline nounwind uwtable }
|
|
|
|
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6}
|
|
|
|
!0 = !{i32 1, !"wchar_size", i32 4}
|
|
!1 = !{i32 7, !"PIC Level", i32 2}
|
|
!2 = !{i32 7, !"PIE Level", i32 2}
|
|
!3 = !{i32 7, !"uwtable", i32 2}
|
|
!4 = !{i32 7, !"frame-pointer", i32 2}
|
|
!5 = !{i32 1, !"ThinLTO", i32 0}
|
|
!6 = !{i32 1, !"EnableSplitLTOUnit", i32 1}
|