This patch is a follow up on https://reviews.llvm.org/D81627. In addition to default -fno-gpu-rdc case, this patches let HIP toolchain not use llvm-link/opt/llc to link device code for -fgpu-rdc case. Instead, uses standard lto. This will eliminate some redundant optimizations and speed up the compilation/linking. Differential Revision: https://reviews.llvm.org/D81861
17 lines
955 B
C
17 lines
955 B
C
// RUN: %clang -### -target amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
|
|
// RUN: %clang -### -g -target amdgcn--amdhsa -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
|
|
// RUN: %clang -### -target amdgcn-amd-amdpal -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
|
|
// RUN: %clang -### -g -target amdgcn-amd-amdpal -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
|
|
// RUN: %clang -### -target amdgcn-mesa-mesa3d -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
|
|
// RUN: %clang -### -g -target amdgcn-mesa-mesa3d -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
|
|
|
|
// AS_LINK: clang{{.*}} "-cc1as"
|
|
// AS_LINK: ld.lld{{.*}} "-shared"
|
|
|
|
// DWARF_VER: "-dwarf-version=4"
|
|
|
|
// RUN: %clang -### -target amdgcn-amd-amdhsa -mcpu=gfx906 -nogpulib \
|
|
// RUN: -flto %s 2>&1 | FileCheck -check-prefix=LTO %s
|
|
// LTO: clang{{.*}} "-flto"
|
|
// LTO: ld.lld{{.*}}
|