This patch adds Module splitting by categories. The splitting algorithm is the necessary step in the SYCL compilation pipeline. Also it could be reused for other heterogenous targets. The previous attempt was at #119713. In this patch there is no dependency in `TransformUtils` on "IPO" and on "Printing Passes". In this patch a module splitting is self-contained and it doesn't introduce linking issues.
18 lines
586 B
LLVM
18 lines
586 B
LLVM
; -- Per-kernel split
|
|
; RUN: llvm-split -split-by-category=kernel -S < %s -o %tC
|
|
; RUN: FileCheck %s -input-file=%tC_0.ll --check-prefixes CHECK-A0
|
|
; RUN: FileCheck %s -input-file=%tC_1.ll --check-prefixes CHECK-A1
|
|
|
|
define dso_local amdgpu_kernel void @KernelA() {
|
|
ret void
|
|
}
|
|
|
|
define dso_local amdgpu_kernel void @KernelB() {
|
|
ret void
|
|
}
|
|
|
|
; CHECK-A0: define dso_local amdgpu_kernel void @KernelB()
|
|
; CHECK-A0-NOT: define dso_local amdgpu_kernel void @KernelA()
|
|
; CHECK-A1-NOT: define dso_local amdgpu_kernel void @KernelB()
|
|
; CHECK-A1: define dso_local amdgpu_kernel void @KernelA()
|