|
1 | 1 | ; This test checks that the -emit-imported-symbols option generates a list of imported symbols |
2 | 2 | ; Function names were chosen so that no function with a 'inside' in their function name is imported |
3 | | -; |
| 3 | +; Note that -emit-imported-symbols will not emit any imported symbols without -support-dynamic-linking. |
4 | 4 |
|
5 | 5 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | 6 | ; Test with -split=kernel |
7 | 7 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
8 | 8 |
|
9 | | -; RUN: sycl-post-link -properties -symbols -emit-imported-symbols -split=kernel -S < %s -o %t_kernel.table |
| 9 | +; RUN: sycl-post-link -properties -symbols -support-dynamic-linking -emit-imported-symbols -split=kernel -S < %s -o %t_kernel.table |
10 | 10 |
|
11 | 11 | ; RUN: FileCheck %s -input-file=%t_kernel_0.sym --check-prefixes CHECK-KERNEL-SYM-0 |
12 | 12 | ; RUN: FileCheck %s -input-file=%t_kernel_1.sym --check-prefixes CHECK-KERNEL-SYM-1 |
|
23 | 23 |
|
24 | 24 | ; CHECK-KERNEL-SYM-1: foo |
25 | 25 | ; CHECK-KERNEL-IMPORTED-SYM-1: [SYCL/imported symbols] |
| 26 | +; CHECK-KERNEL-IMPORTED-SYM-1-NEXT: middle |
26 | 27 | ; CHECK-KERNEL-IMPORTED-SYM-1-NEXT: childA |
27 | 28 | ; CHECK-KERNEL-IMPORTED-SYM-1-NEXT: childC |
28 | | -; CHECK-KERNEL-IMPORTED-SYM-1-NEXT: childD |
29 | 29 | ; CHECK-KERNEL-IMPORTED-SYM-1-EMPTY: |
30 | 30 |
|
31 | 31 |
|
32 | 32 | ; CHECK-KERNEL-SYM-2: bar |
33 | 33 | ; CHECK-KERNEL-IMPORTED-SYM-2: [SYCL/imported symbols] |
| 34 | +; CHECK-KERNEL-IMPORTED-SYM-2-NEXT: middle |
34 | 35 | ; CHECK-KERNEL-IMPORTED-SYM-2-NEXT: childB |
35 | 36 | ; CHECK-KERNEL-IMPORTED-SYM-2-NEXT: childC |
36 | | -; CHECK-KERNEL-IMPORTED-SYM-2-NEXT: childD |
37 | 37 | ; CHECK-KERNEL-IMPORTED-SYM-2-NEXT: _Z7outsidev |
38 | 38 | ; CHECK-KERNEL-IMPORTED-SYM-2-EMPTY: |
39 | 39 |
|
40 | 40 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
41 | 41 | ; Test with -split=source |
42 | 42 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
43 | 43 |
|
44 | | -; RUN: sycl-post-link -properties -symbols -emit-imported-symbols -split=source -S < %s -o %t_source.table |
| 44 | +; RUN: sycl-post-link -properties -symbols -support-dynamic-linking -emit-imported-symbols -split=source -S < %s -o %t_source.table |
45 | 45 | ; RUN: FileCheck %s -input-file=%t_source_0.sym --check-prefixes CHECK-SOURCE-SYM-0 |
46 | 46 | ; RUN: FileCheck %s -input-file=%t_source_0.prop --check-prefixes CHECK-SOURCE-IMPORTED-SYM-0 |
47 | 47 |
|
48 | | -; RUN: sycl-post-link -properties -symbols -emit-imported-symbols -split=source -S < %s -o %t_source.table -O0 |
| 48 | +; RUN: sycl-post-link -properties -symbols -support-dynamic-linking -emit-imported-symbols -split=source -S < %s -o %t_source.table -O0 |
49 | 49 | ; RUN: FileCheck %s -input-file=%t_source_0.sym --check-prefixes CHECK-SOURCE-SYM-0 |
50 | 50 | ; RUN: FileCheck %s -input-file=%t_source_0.prop --check-prefixes CHECK-SOURCE-IMPORTED-SYM-0 |
51 | 51 |
|
@@ -73,7 +73,7 @@ define weak_odr spir_kernel void @foo() #0 { |
73 | 73 | } |
74 | 74 |
|
75 | 75 | define weak_odr spir_kernel void @bar() #0 { |
76 | | - ;; Functions that are not SYCL External (i.e. they have no sycl-module-id) cannot be imported |
| 76 | + ;; Functions whose name start with '__' cannot be imported |
77 | 77 | call spir_func void @__itt_offload_wi_start_wrapper() |
78 | 78 |
|
79 | 79 | call void @childB() |
|
0 commit comments