Skip to content

[sycl-post-link] Refactor cloned modules processing #4828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5d80d3b
[sycl-post-link] Refactor cloned modules processing
mlychkov Oct 26, 2021
7a8d9b8
Fix linux LIT test
mlychkov Oct 28, 2021
838947e
Changed indexing in module processing loop
mlychkov Oct 28, 2021
5534766
Fix linux LIT tests after previous improvement
mlychkov Oct 28, 2021
e3030b9
Fix crash when a module with sycl and esimd modules is split
mlychkov Oct 29, 2021
9138adb
Fix sort.cpp test crash
mlychkov Oct 30, 2021
430abad
Cleanup code
mlychkov Nov 1, 2021
ebfe813
Fix clang format
mlychkov Nov 1, 2021
3ecb57d
Clarify comment
mlychkov Nov 1, 2021
fd9c973
Add option turning on shared value map mode
mlychkov Nov 2, 2021
12d4488
Merge remote-tracking branch 'origin/sycl' into sycl_post_link_1mod_r…
mlychkov Nov 2, 2021
30849f6
Fix clang format and add regression test for CUDA
mlychkov Nov 2, 2021
e865ec1
Fix LIT tests
mlychkov Nov 2, 2021
7bdaec8
Update sycl-post-link tests
mlychkov Nov 4, 2021
9e04aee
Merge remote-tracking branch 'origin/sycl' into sycl_post_link_1mod_r…
mlychkov Nov 11, 2021
5edf930
Remove unused variables
mlychkov Nov 11, 2021
609fb7b
Add empty globals vector if globals set is empty
mlychkov Nov 11, 2021
d1f612e
Fix formatting
mlychkov Nov 11, 2021
97fc261
Fix LIT test
mlychkov Nov 11, 2021
295a791
More robust but time-consuming splitting mechanism
mlychkov Nov 13, 2021
eca6b7a
Fix new splitting algo
mlychkov Nov 13, 2021
da87237
Fix getting module functions
mlychkov Nov 15, 2021
c849fe7
Fix formatting
mlychkov Nov 15, 2021
3c5dc6b
Minor updates
mlychkov Nov 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
; RUN: sycl-post-link -split=auto -symbols -S %s -o %t.table
; RUN: FileCheck %s -input-file=%t_0.prop

; RUN: sycl-post-link -split=auto -symbols -reduce-memory-usage=true -S %s -o %t-red.table
; RUN: FileCheck %s -input-file=%t-red_0.prop

target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
target triple = "spir64-unknown-linux"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
; RUN: sycl-post-link -split=auto -symbols -S %s -o %t.table
; RUN: FileCheck %s -input-file=%t_0.prop

; RUN: sycl-post-link -split=auto -symbols -reduce-memory-usage=true -S %s -o %t-red.table
; RUN: FileCheck %s -input-file=%t-red_0.prop

target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
target triple = "spir64-unknown-linux"

Expand Down
3 changes: 3 additions & 0 deletions llvm/test/tools/sycl-post-link/assert-property-1.ll
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
; RUN: sycl-post-link -split=auto -symbols -S %s -o %t.table
; RUN: FileCheck %s -input-file=%t_0.prop

; RUN: sycl-post-link -split=auto -symbols -reduce-memory-usage=true -S %s -o %t-red.table
; RUN: FileCheck %s -input-file=%t-red_0.prop

; SYCL source:
; void foo() {
; assert(0);
Expand Down
3 changes: 3 additions & 0 deletions llvm/test/tools/sycl-post-link/assert-property-2.ll
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
; RUN: sycl-post-link -split=auto -symbols -S %s -o %t.table
; RUN: FileCheck %s -input-file=%t_0.prop

; RUN: sycl-post-link -split=auto -symbols -reduce-memory-usage=true -S %s -o %t-red.table
; RUN: FileCheck %s -input-file=%t-red_0.prop

; SYCL source:
; void assert_func() {
; assert(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
; RUN: sycl-post-link -split=auto -symbols -S %s -o %t.table
; RUN: FileCheck %s -input-file=%t_0.prop

; RUN: sycl-post-link -split=auto -symbols -reduce-memory-usage=true -S %s -o %t-red.table
; RUN: FileCheck %s -input-file=%t-red_0.prop

target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
target triple = "spir64-unknown-linux"

Expand Down
8 changes: 7 additions & 1 deletion llvm/test/tools/sycl-post-link/auto-module-split-1.ll
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
; RUN: sycl-post-link -split=auto -symbols -S %s -o %t.table
; By default auto mode is equal to source mode
; RUN: sycl-post-link -split=auto -symbols -S %s -o %t.table
; RUN: FileCheck %s -input-file=%t_0.ll --check-prefixes CHECK-TU0,CHECK
; RUN: FileCheck %s -input-file=%t_1.ll --check-prefixes CHECK-TU1,CHECK
; RUN: FileCheck %s -input-file=%t_0.sym --check-prefixes CHECK-TU0-TXT
; RUN: FileCheck %s -input-file=%t_1.sym --check-prefixes CHECK-TU1-TXT

; RUN: sycl-post-link -split=auto -symbols -reduce-memory-usage=true -S %s -o %t-red.table
; RUN: FileCheck %s -input-file=%t-red_0.ll --check-prefixes CHECK-TU0,CHECK
; RUN: FileCheck %s -input-file=%t-red_1.ll --check-prefixes CHECK-TU1,CHECK
; RUN: FileCheck %s -input-file=%t-red_0.sym --check-prefixes CHECK-TU0-TXT
; RUN: FileCheck %s -input-file=%t-red_1.sym --check-prefixes CHECK-TU1-TXT

target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
target triple = "spir64-unknown-linux"

Expand Down
5 changes: 4 additions & 1 deletion llvm/test/tools/sycl-post-link/auto-module-split-2.ll
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
; RUN: sycl-post-link -split=auto -symbols -S %s -o %t.table
; In precense of indirectly callable function auto mode is equal to no split,
; which means that separate LLVM IR file for device is not generated and we only
; need to check generated symbol table
; RUN: sycl-post-link -split=auto -symbols -S %s -o %t.table
; RUN: FileCheck %s -input-file=%t_0.sym --check-prefixes CHECK

; RUN: sycl-post-link -split=auto -symbols -reduce-memory-usage=true -S %s -o %t-red.table
; RUN: FileCheck %s -input-file=%t-red_0.sym --check-prefixes CHECK

target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
target triple = "spir64-unknown-linux"

Expand Down
5 changes: 4 additions & 1 deletion llvm/test/tools/sycl-post-link/auto-module-split-3.ll
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
; RUN: sycl-post-link -split=auto -symbols -S %s -o %t.table
; In precense of indirect calls auto mode is equal to no split,
; which means that separate LLVM IR file for device is not generated and we only
; need to check generated symbol table
; RUN: sycl-post-link -split=auto -symbols -S %s -o %t.table
; RUN: FileCheck %s -input-file=%t_0.sym --check-prefixes CHECK

; RUN: sycl-post-link -split=auto -symbols -reduce-memory-usage=true -S %s -o %t-red.table
; RUN: FileCheck %s -input-file=%t-red_0.sym --check-prefixes CHECK

target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
target triple = "spir64-unknown-linux"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
; RUN: sycl-post-link -split=auto -symbols -S %s -o %t.table
; RUN: FileCheck %s -input-file=%t_0.sym

; RUN: sycl-post-link -split=auto -symbols -reduce-memory-usage=true -S %s -o %t-red.table
; RUN: FileCheck %s -input-file=%t-red_0.sym

; This test checkes that module is not split if function pointer's user is not
; CallInst.

Expand Down
7 changes: 7 additions & 0 deletions llvm/test/tools/sycl-post-link/basic-module-split.ll
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
; RUN: FileCheck %s -input-file=%t_1.ll --check-prefixes CHECK-TU1,CHECK
; RUN: FileCheck %s -input-file=%t_0.sym --check-prefixes CHECK-TU0-TXT
; RUN: FileCheck %s -input-file=%t_1.sym --check-prefixes CHECK-TU1-TXT

; RUN: sycl-post-link -split=source -symbols -reduce-memory-usage=true -S %s -o %t-red.table
; RUN: FileCheck %s -input-file=%t-red_0.ll --check-prefixes CHECK-TU0,CHECK
; RUN: FileCheck %s -input-file=%t-red_1.ll --check-prefixes CHECK-TU1,CHECK
; RUN: FileCheck %s -input-file=%t-red_0.sym --check-prefixes CHECK-TU0-TXT
; RUN: FileCheck %s -input-file=%t-red_1.sym --check-prefixes CHECK-TU1-TXT

; ModuleID = 'basic-module-split.ll'
source_filename = "basic-module-split.ll"
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
Expand Down
46 changes: 46 additions & 0 deletions llvm/test/tools/sycl-post-link/cuda-split-per-kernel.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
; RUN: sycl-post-link -split=kernel -emit-program-metadata -symbols -emit-exported-symbols \
; RUN: -split-esimd -lower-esimd -O2 -spec-const=default -S %s -o %t.table
; RUN: FileCheck %s -input-file=%t_0.ll --check-prefix CHECK-IR0
; RUN: FileCheck %s -input-file=%t_1.ll --check-prefix CHECK-IR1
; RUN: FileCheck %s -input-file=%t_2.ll --check-prefix CHECK-IR2

; RUN: sycl-post-link -split=kernel -emit-program-metadata -symbols -emit-exported-symbols \
; RUN: -split-esimd -lower-esimd -O2 -spec-const=default -reduce-memory-usage=true -S %s -o %t-red.table
; RUN: FileCheck %s -input-file=%t-red_0.ll --check-prefix CHECK-IR0
; RUN: FileCheck %s -input-file=%t-red_1.ll --check-prefix CHECK-IR1
; RUN: FileCheck %s -input-file=%t-red_2.ll --check-prefix CHECK-IR2

; This test checks that kernel info is saved for CUDA target during device code
; splitting.
; It should work for reduce-memory-usage mode as well, but now this information
; is lost for 2nd and subsequent split modules.

; CHECK-IR0: !{{[0-9]+}} = !{void (i32 addrspace(1)*)* @_ZTS5Kern1, !"kernel", i32 1}
; CHECK-IR1: !{{[0-9]+}} = !{void (i32 addrspace(1)*)* @_ZTS5Kern2, !"kernel", i32 1}
; CHECK-IR2: !{{[0-9]+}} = !{void (i32 addrspace(1)*)* @_ZTS5Kern3, !"kernel", i32 1}

target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
target triple = "nvptx64-nvidia-cuda"

define weak_odr dso_local void @_ZTS5Kern1(i32 addrspace(1)* %_arg_) #0 {
entry:
ret void
}

define weak_odr dso_local void @_ZTS5Kern2(i32 addrspace(1)* %_arg_) #0 {
entry:
ret void
}

define weak_odr dso_local void @_ZTS5Kern3(i32 addrspace(1)* %_arg_) #0 {
entry:
ret void
}

attributes #0 = { convergent mustprogress noinline norecurse "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "sycl-module-id"="cuda-split-per-kernel.cpp" "target-cpu"="sm_50" "target-features"="+ptx74,+sm_50" "uniform-work-group-size"="true" }

!nvvm.annotations = !{!0, !1, !2}

!0 = !{void (i32 addrspace(1)*)* @_ZTS5Kern1, !"kernel", i32 1}
!1 = !{void (i32 addrspace(1)*)* @_ZTS5Kern2, !"kernel", i32 1}
!2 = !{void (i32 addrspace(1)*)* @_ZTS5Kern3, !"kernel", i32 1}
15 changes: 15 additions & 0 deletions llvm/test/tools/sycl-post-link/emit_exported_symbols.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,34 @@
; RUN: sycl-post-link -symbols -emit-exported-symbols -S %s -o %t.global.files.table
; RUN: FileCheck %s -input-file=%t.global.files_0.prop --implicit-check-not="NotExported" --check-prefix=CHECK-GLOBAL-PROP
;
; RUN: sycl-post-link -symbols -emit-exported-symbols -reduce-memory-usage=true -S %s -o %t-red.global.files.table
; RUN: FileCheck %s -input-file=%t-red.global.files_0.prop --implicit-check-not="NotExported" --check-prefix=CHECK-GLOBAL-PROP
;
; Per-module split
; RUN: sycl-post-link -symbols -split=source -emit-exported-symbols -S %s -o %t.per_module.files.table
; RUN: FileCheck %s -input-file=%t.per_module.files_0.prop -implicit-check-not="NotExported" --check-prefix=CHECK-PERMODULE-0-PROP
; RUN: FileCheck %s -input-file=%t.per_module.files_1.prop -implicit-check-not="NotExported" --check-prefix=CHECK-PERMODULE-1-PROP
; RUN: FileCheck %s -input-file=%t.per_module.files_2.prop -implicit-check-not="NotExported" --check-prefix=CHECK-KERNELONLY-PROP
;
; RUN: sycl-post-link -symbols -split=source -emit-exported-symbols -reduce-memory-usage=true -S %s -o %t-red.per_module.files.table
; RUN: FileCheck %s -input-file=%t-red.per_module.files_0.prop -implicit-check-not="NotExported" --check-prefix=CHECK-PERMODULE-0-PROP
; RUN: FileCheck %s -input-file=%t-red.per_module.files_1.prop -implicit-check-not="NotExported" --check-prefix=CHECK-PERMODULE-1-PROP
; RUN: FileCheck %s -input-file=%t-red.per_module.files_2.prop -implicit-check-not="NotExported" --check-prefix=CHECK-KERNELONLY-PROP
;
; Per-kernel split
; RUN: sycl-post-link -symbols -split=kernel -emit-exported-symbols -S %s -o %t.per_kernel.files.table
; RUN: FileCheck %s -input-file=%t.per_kernel.files_0.prop --implicit-check-not="NotExported" --check-prefix=CHECK-PERKERNEL-0-PROP
; RUN: FileCheck %s -input-file=%t.per_kernel.files_1.prop --implicit-check-not="NotExported" --check-prefix=CHECK-PERKERNEL-1-PROP
; RUN: FileCheck %s -input-file=%t.per_kernel.files_2.prop --implicit-check-not="NotExported" --check-prefix=CHECK-PERKERNEL-2-PROP
; RUN: FileCheck %s -input-file=%t.per_kernel.files_3.prop --implicit-check-not="NotExported" --check-prefix=CHECK-KERNELONLY-PROP
; RUN: FileCheck %s -input-file=%t.per_kernel.files_4.prop --implicit-check-not="NotExported" --check-prefix=CHECK-KERNELONLY-PROP
;
; RUN: sycl-post-link -symbols -split=kernel -emit-exported-symbols -reduce-memory-usage=true -S %s -o %t-red.per_kernel.files.table
; RUN: FileCheck %s -input-file=%t-red.per_kernel.files_0.prop --implicit-check-not="NotExported" --check-prefix=CHECK-PERKERNEL-0-PROP
; RUN: FileCheck %s -input-file=%t-red.per_kernel.files_1.prop --implicit-check-not="NotExported" --check-prefix=CHECK-PERKERNEL-1-PROP
; RUN: FileCheck %s -input-file=%t-red.per_kernel.files_2.prop --implicit-check-not="NotExported" --check-prefix=CHECK-PERKERNEL-2-PROP
; RUN: FileCheck %s -input-file=%t-red.per_kernel.files_3.prop --implicit-check-not="NotExported" --check-prefix=CHECK-KERNELONLY-PROP
; RUN: FileCheck %s -input-file=%t-red.per_kernel.files_4.prop --implicit-check-not="NotExported" --check-prefix=CHECK-KERNELONLY-PROP

target triple = "spir64-unknown-unknown"

Expand Down
4 changes: 4 additions & 0 deletions llvm/test/tools/sycl-post-link/emit_program_metadata.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
; RUN: FileCheck %s -input-file=%t.files.table --check-prefixes CHECK-TABLE
; RUN: FileCheck %s -input-file=%t.files_0.prop --match-full-lines --check-prefixes CHECK-PROP

; RUN: sycl-post-link -emit-program-metadata -reduce-memory-usage=true -S %s -o %t-red.files.table
; RUN: FileCheck %s -input-file=%t-red.files.table --check-prefixes CHECK-TABLE
; RUN: FileCheck %s -input-file=%t-red.files_0.prop --match-full-lines --check-prefixes CHECK-PROP

target triple = "spir64-unknown-unknown"

!0 = !{i32 1, i32 2, i32 4}
Expand Down
10 changes: 10 additions & 0 deletions llvm/test/tools/sycl-post-link/erase_used.ll
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,21 @@
; RUN: FileCheck %s -input-file=%t.files_0.ll
; RUN: FileCheck %s -input-file=%t.files_1.ll
;
; RUN: sycl-post-link -split=kernel -reduce-memory-usage=true -S %s -o %t-red.files.table
; RUN: FileCheck %s -input-file=%t-red.files_0.ll
; RUN: FileCheck %s -input-file=%t-red.files_1.ll
;
; RUN: sycl-post-link -S -split=auto -symbols -split-esimd -lower-esimd -O2 -spec-const=default %s -o %t.out.table
; RUN: FileCheck %s --input-file=%t.out_0.ll
;
; RUN: sycl-post-link -S -split=auto -symbols -split-esimd -lower-esimd -O2 -spec-const=default -reduce-memory-usage=true %s -o %t-red.out.table
; RUN: FileCheck %s --input-file=%t-red.out_0.ll
;
; RUN: sycl-post-link -S -split=auto -ir-output-only %s -o %t.out_ir_only.ll
; RUN: FileCheck %s --input-file %t.out_ir_only.ll
;
; RUN: sycl-post-link -S -split=auto -ir-output-only -reduce-memory-usage=true %s -o %t-red.out_ir_only.ll
; RUN: FileCheck %s --input-file %t-red.out_ir_only.ll

target triple = "spir64-unknown-unknown"

Expand Down
31 changes: 16 additions & 15 deletions llvm/test/tools/sycl-post-link/help.test
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,22 @@ CHECK: OPTIONS:

CHECK: Generic Options:

CHECK: --help - Display available options (--help-hidden for more)
CHECK: --help-list - Display list of available options (--help-list-hidden for more)
CHECK: --version - Display the version of this program
CHECK: --help - Display available options (--help-hidden for more)
CHECK: --help-list - Display list of available options (--help-list-hidden for more)
CHECK: --version - Display the version of this program

CHECK: sycl-post-link options:

CHECK: -f - Enable binary output on terminals
CHECK: --ir-output-only - Output single IR file
CHECK: -o=<filename> - Output filename
CHECK: --out-dir=<dirname> - Directory where files listed in the result file table will be output
CHECK: --spec-const=<value> - lower and generate specialization constants information
CHECK: =rt - spec constants are set at runtime
CHECK: =default - set spec constants to C++ defaults
CHECK: --split=<value> - split input module
CHECK: =source - 1 output module per source (translation unit)
CHECK: =kernel - 1 output module per kernel
CHECK: =auto - Choose split mode automatically
CHECK: --symbols - generate exported symbol files
CHECK: -f - Enable binary output on terminals
CHECK: --ir-output-only - Output single IR file
CHECK: -o=<filename> - Output filename
CHECK: --out-dir=<dirname> - Directory where files listed in the result file table will be output
CHECK: --reduce-memory-usage - Share temporary auxiliary memory to reduce RAM utilization
CHECK: --spec-const=<value> - lower and generate specialization constants information
CHECK: =rt - spec constants are set at runtime
CHECK: =default - set spec constants to C++ defaults
CHECK: --split=<value> - split input module
CHECK: =source - 1 output module per source (translation unit)
CHECK: =kernel - 1 output module per kernel
CHECK: =auto - Choose split mode automatically
CHECK: --symbols - generate exported symbol files
3 changes: 3 additions & 0 deletions llvm/test/tools/sycl-post-link/ir-output-only.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
; RUN: sycl-post-link --ir-output-only -split=auto -S %s -o %t.ll
; RUN: FileCheck %s -input-file=%t.ll

; RUN: sycl-post-link --ir-output-only -split=auto -reduce-memory-usage=true -S %s -o %t-red.ll
; RUN: FileCheck %s -input-file=%t-red.ll

; This test checks that the --ir-output-only option writes a LLVM IR
; file instead of a table. In comparison with other tests, this one
; checks that the option works OK with -split=auto.
Expand Down
4 changes: 4 additions & 0 deletions llvm/test/tools/sycl-post-link/omit_kernel_args.ll
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
; RUN: sycl-post-link -emit-param-info -S %s -o %t.files.table
; RUN: FileCheck %s -input-file=%t.files.table --check-prefixes CHECK-TABLE
; RUN: FileCheck %s -input-file=%t.files_0.prop --match-full-lines --check-prefixes CHECK-PROP
;
; RUN: sycl-post-link -emit-param-info -reduce-memory-usage=true -S %s -o %t-red.files.table
; RUN: FileCheck %s -input-file=%t-red.files.table --check-prefixes CHECK-TABLE
; RUN: FileCheck %s -input-file=%t-red.files_0.prop --match-full-lines --check-prefixes CHECK-PROP

target triple = "spir64-unknown-unknown"

Expand Down
9 changes: 9 additions & 0 deletions llvm/test/tools/sycl-post-link/one-kernel-per-module.ll
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
; RUN: FileCheck %s -input-file=%t.files_0.sym --check-prefixes CHECK-MODULE0-TXT
; RUN: FileCheck %s -input-file=%t.files_1.sym --check-prefixes CHECK-MODULE1-TXT
; RUN: FileCheck %s -input-file=%t.files_2.sym --check-prefixes CHECK-MODULE2-TXT

; RUN: sycl-post-link -split=kernel -symbols -reduce-memory-usage=true -S %s -o %t-red.files.table
; RUN: FileCheck %s -input-file=%t-red.files_0.ll --check-prefixes CHECK-MODULE0,CHECK
; RUN: FileCheck %s -input-file=%t-red.files_1.ll --check-prefixes CHECK-MODULE1,CHECK
; RUN: FileCheck %s -input-file=%t-red.files_2.ll --check-prefixes CHECK-MODULE2,CHECK
; RUN: FileCheck %s -input-file=%t-red.files_0.sym --check-prefixes CHECK-MODULE0-TXT
; RUN: FileCheck %s -input-file=%t-red.files_1.sym --check-prefixes CHECK-MODULE1-TXT
; RUN: FileCheck %s -input-file=%t-red.files_2.sym --check-prefixes CHECK-MODULE2-TXT

; ModuleID = 'one-kernel-per-module.ll'
source_filename = "one-kernel-per-module.ll"
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
; RUN: sycl-post-link -spec-const=rt --ir-output-only %s -S -o - \
; RUN: | FileCheck %s --implicit-check-not "call {{.*}} __sycl_getCompositeSpecConstantValue"
;
; RUN: sycl-post-link -spec-const=rt --ir-output-only -reduce-memory-usage=true %s -S -o - \
; RUN: | FileCheck %s --implicit-check-not "call {{.*}} __sycl_getCompositeSpecConstantValue"
;
; This test is intended to check that sycl-post-link tool is capable of handling
; composite specialization constants by lowering them into a set of SPIR-V
; friendly IR operations representing those constants.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
; RUN: sycl-post-link -spec-const=rt --ir-output-only %s -S -o - \
; RUN: | FileCheck %s --implicit-check-not "call {{.*}} __sycl_getCompositeSpecConstantValue"
;
; RUN: sycl-post-link -spec-const=rt --ir-output-only -reduce-memory-usage=true %s -S -o - \
; RUN: | FileCheck %s --implicit-check-not "call {{.*}} __sycl_getCompositeSpecConstantValue"
;
; This test is intended to check that sycl-post-link tool is capable of handling
; situations when the same composite specialization constants is used more than
; once. Unlike multiple-composite-spec-const-usages.ll test, this is a real life
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
; RUN: sycl-post-link -spec-const=rt --ir-output-only %s -S -o - \
; RUN: | FileCheck %s --implicit-check-not "call {{.*}} __sycl_getCompositeSpecConstantValue"
;
; RUN: sycl-post-link -spec-const=rt --ir-output-only -reduce-memory-usage=true %s -S -o - \
; RUN: | FileCheck %s --implicit-check-not "call {{.*}} __sycl_getCompositeSpecConstantValue"
;
; This test is intended to check that sycl-post-link tool is capable of handling
; situations when the same composite specialization constants is used more than
; once
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
; RUN: sycl-post-link -spec-const=rt --ir-output-only %s -S -o - \
; RUN: | FileCheck %s

; RUN: sycl-post-link -spec-const=rt --ir-output-only -reduce-memory-usage=true %s -S -o - \
; RUN: | FileCheck %s

target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
target triple = "spir64-unknown-unknown"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

; RUN: sycl-post-link -spec-const=rt --ir-output-only %s -S -o %t.ll

; RUN: sycl-post-link -spec-const=rt --ir-output-only -reduce-memory-usage=true %s -S -o %t-red.ll

target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
target triple = "spir64-unknown-unknown"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
; RUN: sycl-post-link --ir-output-only -spec-const=rt %s -S -o - | \
; RUN: FileCheck %s -check-prefixes=CHECK,CHECK-RT

; RUN: sycl-post-link --ir-output-only -spec-const=default -reduce-memory-usage=true %s -S -o - | \
; RUN: FileCheck %s -check-prefixes=CHECK,CHECK-DEF
; RUN: sycl-post-link --ir-output-only -spec-const=rt -reduce-memory-usage=true %s -S -o - | \
; RUN: FileCheck %s -check-prefixes=CHECK,CHECK-RT

; This test checks that the post link tool is able to correctly transform
; specialization constant intrinsics in an unoptimized device code compiled

Expand Down
Loading