Skip to content

Commit 8c58df9

Browse files
committed
clean -fno-sycl-device-lib=all in driver lit
Signed-off-by: jinge90 <[email protected]>
1 parent e7e739e commit 8c58df9

23 files changed

+116
-138
lines changed

clang/test/Driver/sycl-device-lib-amdgcn.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@
44

55
// UNSUPPORTED: system-windows
66

7-
// Check that -fno-sycl-device-lib is ignored when it does not contain "all".
8-
// A warning should be printed that the flag got ignored.
9-
// RUN: %clangxx -ccc-print-phases -std=c++11 -fsycl --sysroot=%S/Inputs/SYCL \
10-
// RUN: -fno-sycl-device-lib=libc,libm-fp32,libm-fp64,libimf-fp32,libimf-fp64,libimf-bf16,libm-bfloat16 \
11-
// RUN: -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 %s 2>&1 \
12-
// RUN: | FileCheck -check-prefixes=CHK-UNUSED-WARN,CHK-ALL %s
13-
14-
// CHK-UNUSED-WARN: warning: argument unused during compilation: '-fno-sycl-device-lib='
15-
// CHK-ALL: [[DEVLIB:[0-9]+]]: input, "{{.*}}devicelib-amdgcn-amd-amdhsa.bc", ir, (device-sycl, gfx906)
16-
// CHK-ALL: {{[0-9]+}}: linker, {{{.*}}[[DEVLIB]]{{.*}}}, ir, (device-sycl, gfx906)
17-
187
// Check that llvm-link uses the "-only-needed" flag.
198
// Not using the flag breaks kernel bundles.
209
// RUN: %clangxx -### -fsycl -fsycl-targets=amdgcn-amd-amdhsa -fno-sycl-libspirv --sysroot=%S/Inputs/SYCL \

clang/test/Driver/sycl-device-lib-nvptx.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@
44

55
// UNSUPPORTED: system-windows
66

7-
// Check that -fno-sycl-device-lib is ignored when it does not contain "all".
8-
// A warning should be printed that the flag got ignored.
9-
// RUN: %clangxx -ccc-print-phases -std=c++11 -fsycl --sysroot=%S/Inputs/SYCL \
10-
// RUN: -fno-sycl-device-lib=libc,libm-fp32,libm-fp64,libimf-fp32,libimf-fp64,libimf-bf16,libm-bfloat16 \
11-
// RUN: -fsycl-targets=nvptx64-nvidia-cuda %s 2>&1 \
12-
// RUN: | FileCheck -check-prefixes=CHK-UNUSED-WARN,CHK-ALL %s
13-
14-
// CHK-UNUSED-WARN: warning: argument unused during compilation: '-fno-sycl-device-lib='
15-
// CHK-ALL: [[DEVLIB:[0-9]+]]: input, "{{.*}}devicelib-nvptx64-nvidia-cuda.bc", ir, (device-sycl, sm_50)
16-
// CHK-ALL: {{[0-9]+}}: linker, {{{.*}}[[DEVLIB]]{{.*}}}, ir, (device-sycl, sm_50)
17-
187
// Check that llvm-link uses the "-only-needed" flag.
198
// Not using the flag breaks kernel bundles.
209
// RUN: %clangxx -### --cuda-path=%S/Inputs/CUDA/usr/local/cuda -fno-sycl-libspirv --sysroot=%S/Inputs/SYCL \

clang/test/Driver/sycl-early-device-link-old-model.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
// RUN: %clangxx -c -fno-sycl-rdc -fsycl --no-offload-new-driver -fsycl-targets=spir64_gen \
2424
// RUN: --target=x86_64-unknown-linux-gnu -Xsycl-target-backend \
2525
// RUN: "-device skl" --sysroot=%S/Inputs/SYCL -ccc-print-phases %s \
26-
// RUN: -fsycl-instrument-device-code -fno-sycl-device-lib=all 2>&1 \
26+
// RUN: -fsycl-instrument-device-code --no-offloadlib 2>&1 \
2727
// RUN: | FileCheck %s -check-prefix=CREATE_IMAGE_PHASES
2828
// CREATE_IMAGE_PHASES: 0: input, "[[INPUT:.+\.cpp]]", c++, (device-sycl)
2929
// CREATE_IMAGE_PHASES: 1: preprocessor, {0}, c++-cpp-output, (device-sycl)
@@ -51,7 +51,7 @@
5151
// Use of -fno-sycl-rdc -c with non-AOT should not perform the device link.
5252
// RUN: %clangxx -c -fno-sycl-rdc -fsycl --no-offload-new-driver -fsycl-targets=spir64 \
5353
// RUN: --target=x86_64-unknown-linux-gnu -ccc-print-phases %s \
54-
// RUN: -fno-sycl-device-lib=all 2>&1 \
54+
// RUN: --no-offloadlib 2>&1 \
5555
// RUN: | FileCheck %s -check-prefix=JIT_ONLY_PHASES
5656
// JIT_ONLY_PHASES: 0: input, "[[INPUT:.+\.cpp]]", c++, (device-sycl)
5757
// JIT_ONLY_PHASES: 1: preprocessor, {0}, c++-cpp-output, (device-sycl)
@@ -70,7 +70,7 @@
7070
// RUN: %clangxx -c -fno-sycl-rdc -fsycl --no-offload-new-driver -fsycl-targets=spir64,spir64_gen \
7171
// RUN: --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/SYCL \
7272
// RUN: -Xsycl-target-backend=spir64_gen "-device skl" \
73-
// RUN: -fsycl-instrument-device-code -ccc-print-phases %s -fno-sycl-device-lib=all 2>&1 \
73+
// RUN: -fsycl-instrument-device-code -ccc-print-phases %s --no-offloadlib 2>&1 \
7474
// RUN: | FileCheck %s -check-prefix=JIT_AOT_PHASES
7575
// JIT_AOT_PHASES: 0: input, "[[INPUT:.+\.cpp]]", c++, (device-sycl)
7676
// JIT_AOT_PHASES: 1: preprocessor, {0}, c++-cpp-output, (device-sycl)

clang/test/Driver/sycl-force-target.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
/// Verify the usage of -fsycl-force-target applies to all expected unbundlings
2626
/// and also applies to clang-offload-deps step
2727
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -fsycl-force-target=spir64 \
28-
// RUN: -target x86_64-unknown-linux-gnu -fno-sycl-device-lib=all \
28+
// RUN: -target x86_64-unknown-linux-gnu --no-offloadlib \
2929
// RUN: %s %S/Inputs/SYCL/liblin64.a -### 2>&1 \
3030
// RUN: | FileCheck %s -check-prefix=CHECK_FORCE_TARGET_ARCHIVE
3131
// CHECK_FORCE_TARGET_ARCHIVE: clang-offload-deps{{.*}} "-targets=sycl-spir64-unknown-unknown" "-outputs={{.*}}"

clang/test/Driver/sycl-instrumentation-old-model.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-instrument-device-code --sysroot=%S/Inputs/SYCL -fsycl-targets=spir64 -### %s 2>&1 \
1111
// RUN: | FileCheck -check-prefixes=CHECK-SPIRV,CHECK-HOST %s
1212
// -fno-sycl-device-lib mustn't affect the linkage of ITT libraries
13-
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-instrument-device-code --sysroot=%S/Inputs/SYCL -fno-sycl-device-lib=all -fsycl-targets=spir64 -### %s 2>&1 \
13+
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-instrument-device-code --sysroot=%S/Inputs/SYCL --no-offloadlib -fsycl-targets=spir64 -### %s 2>&1 \
1414
// RUN: | FileCheck -check-prefixes=CHECK-SPIRV %s
1515

1616
// CHECK-SPIRV: "-cc1"{{.*}} "-fsycl-is-device"{{.*}} "-fsycl-instrument-device-code"

clang/test/Driver/sycl-instrumentation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-instrument-device-code --offload-new-driver --sysroot=%S/Inputs/SYCL -fsycl-targets=spir64 -### %s 2>&1 \
1111
// RUN: | FileCheck -check-prefixes=CHECK-SPIRV,CHECK-HOST %s
1212
// -fno-sycl-device-lib mustn't affect the linkage of ITT libraries
13-
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-instrument-device-code --offload-new-driver --sysroot=%S/Inputs/SYCL -fno-sycl-device-lib=all -fsycl-targets=spir64 -### %s 2>&1 \
13+
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-instrument-device-code --offload-new-driver --sysroot=%S/Inputs/SYCL --no-offloadlib -fsycl-targets=spir64 -### %s 2>&1 \
1414
// RUN: | FileCheck -check-prefixes=CHECK-SPIRV %s
1515

1616
// CHECK-SPIRV: "-cc1"{{.*}} "-fsycl-is-device"{{.*}} "-fsycl-instrument-device-code"

clang/test/Driver/sycl-int-footer-old-model.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
// NO-FOOTER: clang{{.*}} "-fsycl-is-host"{{.*}} "-include-internal-header" "[[INTHEADER]]"
3535

3636
/// Check phases without integration footer
37-
// RUN: %clangxx -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fno-sycl-use-footer -target x86_64-unknown-linux-gnu %s -ccc-print-phases 2>&1 \
37+
// RUN: %clangxx -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code --no-offloadlib -fno-sycl-use-footer -target x86_64-unknown-linux-gnu %s -ccc-print-phases 2>&1 \
3838
// RUN: | FileCheck -check-prefix NO-FOOTER-PHASES -check-prefix COMMON-PHASES %s
3939
// NO-FOOTER-PHASES: 0: input, "{{.*}}", c++, (host-sycl)
4040
// NO-FOOTER-PHASES: [[#HOST_PREPROC:]]: preprocessor, {0}, c++-cpp-output, (host-sycl)
@@ -43,7 +43,7 @@
4343
// NO-FOOTER-PHASES: [[#DEVICE_IR:]]: compiler, {3}, ir, (device-sycl)
4444

4545
/// Check phases with integration footer
46-
// RUN: %clangxx -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -target x86_64-unknown-linux-gnu %s -ccc-print-phases 2>&1 \
46+
// RUN: %clangxx -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code --no-offloadlib -target x86_64-unknown-linux-gnu %s -ccc-print-phases 2>&1 \
4747
// RUN: | FileCheck -check-prefix FOOTER-PHASES -check-prefix COMMON-PHASES %s
4848
// FOOTER-PHASES: 0: input, "{{.*}}", c++, (host-sycl)
4949
// FOOTER-PHASES: [[#HOST_PREPROC:]]: preprocessor, {0}, c++-cpp-output, (host-sycl)

clang/test/Driver/sycl-int-header-footer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
// NO-FOOTER: clang{{.*}} "-fsycl-is-host"{{.*}} "-include-internal-header" "[[INTHEADER]]"
3333

3434
/// Check phases without integration footer
35-
// RUN: %clangxx -fsycl --offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fno-sycl-use-footer -target x86_64-unknown-linux-gnu %s -ccc-print-phases 2>&1 \
35+
// RUN: %clangxx -fsycl --offload-new-driver -fno-sycl-instrument-device-code --no-offloadlib -fno-sycl-use-footer -target x86_64-unknown-linux-gnu %s -ccc-print-phases 2>&1 \
3636
// RUN: | FileCheck -check-prefix NO-FOOTER-PHASES -check-prefix COMMON-PHASES %s
3737
// NO-FOOTER-PHASES: 0: input, "{{.*}}", c++, (host-sycl)
3838
// NO-FOOTER-PHASES: 1: preprocessor, {0}, c++-cpp-output, (host-sycl)
@@ -42,7 +42,7 @@
4242
// NO-FOOTER-PHASES: [[#DEVICE_IR:]]: compiler, {4}, ir, (device-sycl)
4343

4444
/// Check phases with integration footer
45-
// RUN: %clangxx -fsycl --offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -target x86_64-unknown-linux-gnu %s -ccc-print-phases 2>&1 \
45+
// RUN: %clangxx -fsycl --offload-new-driver -fno-sycl-instrument-device-code --no-offloadlib -target x86_64-unknown-linux-gnu %s -ccc-print-phases 2>&1 \
4646
// RUN: | FileCheck -check-prefix FOOTER-PHASES -check-prefix COMMON-PHASES %s
4747
// FOOTER-PHASES: 0: input, "{{.*}}", c++, (host-sycl)
4848
// FOOTER-PHASES: 1: preprocessor, {0}, c++-cpp-output, (host-sycl)

clang/test/Driver/sycl-offload-aot.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@
4646
// CHK-FSYCL-TARGET-2X-ERROR-NOT: clang{{.*}} error: cannot deduce implicit triple value for '-Xsycl-target{{.*}}', specify triple using '-Xsycl-target{{.*}}=<triple>'
4747

4848
/// Ahead of Time compilation for gen, cpu
49-
// RUN: %clang -target x86_64-unknown-linux-gnu -ccc-print-phases -fsycl -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-targets=spir64_gen-unknown-unknown %s 2>&1 \
49+
// RUN: %clang -target x86_64-unknown-linux-gnu -ccc-print-phases -fsycl -fno-sycl-instrument-device-code --no-offloadlib -fsycl-targets=spir64_gen-unknown-unknown %s 2>&1 \
5050
// RUN: | FileCheck %s -check-prefixes=CHK-PHASES-AOT,CHK-PHASES-GEN
51-
// RUN: %clang -target x86_64-unknown-linux-gnu -ccc-print-phases -fsycl -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-targets=spir64_gen %s 2>&1 \
51+
// RUN: %clang -target x86_64-unknown-linux-gnu -ccc-print-phases -fsycl -fno-sycl-instrument-device-code --no-offloadlib -fsycl-targets=spir64_gen %s 2>&1 \
5252
// RUN: | FileCheck %s -check-prefixes=CHK-PHASES-AOT,CHK-PHASES-GEN
53-
// RUN: %clang -target x86_64-unknown-linux-gnu -ccc-print-phases -fsycl -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-targets=spir64_x86_64-unknown-unknown %s 2>&1 \
53+
// RUN: %clang -target x86_64-unknown-linux-gnu -ccc-print-phases -fsycl -fno-sycl-instrument-device-code --no-offloadlib -fsycl-targets=spir64_x86_64-unknown-unknown %s 2>&1 \
5454
// RUN: | FileCheck %s -check-prefixes=CHK-PHASES-AOT,CHK-PHASES-CPU
55-
// RUN: %clang -target x86_64-unknown-linux-gnu -ccc-print-phases -fsycl -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-targets=spir64_x86_64 %s 2>&1 \
55+
// RUN: %clang -target x86_64-unknown-linux-gnu -ccc-print-phases -fsycl -fno-sycl-instrument-device-code --no-offloadlib -fsycl-targets=spir64_x86_64 %s 2>&1 \
5656
// RUN: | FileCheck %s -check-prefixes=CHK-PHASES-AOT,CHK-PHASES-CPU
5757
// CHK-PHASES-AOT: 0: input, "[[INPUT:.+\.cpp]]", c++, (host-sycl)
5858
// CHK-PHASES-AOT: 1: preprocessor, {0}, c++-cpp-output, (host-sycl)
@@ -79,13 +79,13 @@
7979
/// ###########################################################################
8080

8181
/// Ahead of Time compilation for gen, cpu - tool invocation
82-
// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-targets=spir64_gen-unknown-unknown %s -### 2>&1 \
82+
// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-instrument-device-code --no-offloadlib -fsycl-targets=spir64_gen-unknown-unknown %s -### 2>&1 \
8383
// RUN: | FileCheck %s -check-prefixes=CHK-TOOLS-AOT,CHK-TOOLS-GEN
84-
// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-targets=spir64_x86_64-unknown-unknown %s -### 2>&1 \
84+
// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-instrument-device-code --no-offloadlib -fsycl-targets=spir64_x86_64-unknown-unknown %s -### 2>&1 \
8585
// RUN: | FileCheck %s -check-prefixes=CHK-TOOLS-AOT,CHK-TOOLS-CPU
86-
// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-targets=spir64_gen-unknown-unknown %s -### 2>&1 \
86+
// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-instrument-device-code --no-offloadlib -fsycl-targets=spir64_gen-unknown-unknown %s -### 2>&1 \
8787
// RUN: | FileCheck %s -check-prefixes=CHK-TOOLS-AOT,CHK-TOOLS-GEN
88-
// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-targets=spir64_x86_64-unknown-unknown %s -### 2>&1 \
88+
// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-instrument-device-code --no-offloadlib -fsycl-targets=spir64_x86_64-unknown-unknown %s -### 2>&1 \
8989
// RUN: | FileCheck %s -check-prefixes=CHK-TOOLS-AOT,CHK-TOOLS-CPU
9090
// CHK-TOOLS-GEN: clang{{.*}} "-triple" "spir64_gen-unknown-unknown"
9191
// CHK-TOOLS-CPU: clang{{.*}} "-triple" "spir64_x86_64-unknown-unknown"
@@ -179,7 +179,7 @@
179179
/// ###########################################################################
180180

181181
/// offload with multiple targets, including AOT
182-
// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-targets=spir64-unknown-unknown,spir64_x86_64-unknown-unknown,spir64_gen-unknown-unknown -ccc-print-phases %s 2>&1 \
182+
// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-instrument-device-code --no-offloadlib -fsycl-targets=spir64-unknown-unknown,spir64_x86_64-unknown-unknown,spir64_gen-unknown-unknown -ccc-print-phases %s 2>&1 \
183183
// RUN: | FileCheck -check-prefix=CHK-PHASE-MULTI-TARG %s
184184
// CHK-PHASE-MULTI-TARG: 0: input, "[[INPUT:.+\.cpp]]", c++, (host-sycl)
185185
// CHK-PHASE-MULTI-TARG: 1: preprocessor, {0}, c++-cpp-output, (host-sycl)

clang/test/Driver/sycl-offload-nvptx.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
/// Check phases w/out specifying a compute capability.
3838
// RUN: %clangxx -ccc-print-phases --sysroot=%S/Inputs/SYCL -std=c++11 \
39-
// RUN: -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-device-lib=all \
39+
// RUN: -target x86_64-unknown-linux-gnu -fsycl --no-offloadlib \
4040
// RUN: -fsycl-targets=nvptx64-nvidia-cuda %s 2>&1 \
4141
// RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/share/clc/remangled-l32-signed_char.libspirv-nvptx64-nvidia-cuda.bc \
4242
// RUN: --cuda-path=%S/Inputs/CUDA_111/usr/local/cuda \
@@ -70,7 +70,7 @@
7070
//
7171
/// Check phases specifying a compute capability.
7272
// RUN: %clangxx -ccc-print-phases --sysroot=%S/Inputs/SYCL -std=c++11 \
73-
// RUN: -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-device-lib=all \
73+
// RUN: -target x86_64-unknown-linux-gnu -fsycl --no-offloadlib \
7474
// RUN: -fsycl-targets=nvptx64-nvidia-cuda \
7575
// RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/share/clc/remangled-l32-signed_char.libspirv-nvptx64-nvidia-cuda.bc \
7676
// RUN: --cuda-path=%S/Inputs/CUDA_111/usr/local/cuda \

0 commit comments

Comments
 (0)