[PATCH] D137018: [SPIRV] support enqueue_kernel builtin functions

Andrey Tretyakov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 29 08:51:54 PDT 2022


andreytr added inline comments.


================
Comment at: llvm/test/CodeGen/SPIRV/EnqueueEmptyKernel.ll:31
+
+; Function Attrs: convergent nounwind
+define spir_kernel void @test_enqueue_empty() {
----------------
Delete these unnecessary/unused compiler's comments, please.


================
Comment at: llvm/test/CodeGen/SPIRV/EnqueueEmptyKernel.ll:39-41
+; CHECK-SPIRV: %[[Int8PtrBlock:[0-9]+]] = OpBitcast %[[#Int8Ptr]] %[[#Block]]
+; CHECK-SPIRV: %[[Int8PtrGenBlock:[0-9]+]] = OpPtrCastToGeneric %[[#Int8PtrGen]] %[[Int8PtrBlock]]
+; CHECK-SPIRV: %[[#]] = OpEnqueueKernel %[[#]] %[[#]] %[[#]] %[[#]] %[[#]] %[[#]] %[[#]] %[[#Invoke:]] %[[Int8PtrGenBlock]] %[[#]] %[[#]]
----------------
Missed [0-9]+ -> # conversion.


================
Comment at: llvm/test/CodeGen/SPIRV/EnqueueEmptyKernel.ll:44
+
+; Function Attrs: convergent
+declare spir_func %opencl.queue_t* @_Z17get_default_queuev()
----------------
Remove this too.


================
Comment at: llvm/test/CodeGen/SPIRV/EnqueueEmptyKernel.ll:47
+
+; Function Attrs: convergent
+declare spir_func void @_Z10ndrange_1Dm(%struct.ndrange_t* sret(%struct.ndrange_t*), i64)
----------------
-1


================
Comment at: llvm/test/CodeGen/SPIRV/EnqueueEmptyKernel.ll:50
+
+; Function Attrs: convergent nounwind
+define internal spir_func void @__test_enqueue_empty_block_invoke(i8 addrspace(4)* %.block_descriptor) {
----------------
--


================
Comment at: llvm/test/CodeGen/SPIRV/EnqueueEmptyKernel.ll:59
+
+; Function Attrs: nounwind
+define internal spir_kernel void @__test_enqueue_empty_block_invoke_kernel(i8 addrspace(4)*) {
----------------
--


================
Comment at: llvm/test/CodeGen/SPIRV/EnqueueEmptyKernel.ll:68
+
+; CHECK-SPIRV: %[[#Invoke]] = OpFunction %[[#Void]] None %[[#]]
+; CHECK-SPIRV-NEXT: %[[#]] = OpFunctionParameter %[[#Int8PtrGen]]
----------------
Indent.


================
Comment at: llvm/test/CodeGen/SPIRV/transcoding/enqueue_kernel.ll:125
+
+; Function Attrs: convergent noinline norecurse nounwind optnone
+define dso_local spir_kernel void @device_side_enqueue(i32 addrspace(1)* noundef %a, i32 addrspace(1)* noundef %b, i32 noundef %i, i8 noundef signext %c0) {
----------------
--


================
Comment at: llvm/test/CodeGen/SPIRV/transcoding/enqueue_kernel.ll:257
+
+; Function Attrs: argmemonly nofree nounwind willreturn
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg)
----------------
--


================
Comment at: llvm/test/CodeGen/SPIRV/transcoding/enqueue_kernel.ll:260
+
+; Function Attrs: convergent noinline nounwind optnone
+define internal spir_func void @__device_side_enqueue_block_invoke(i8 addrspace(4)* noundef %.block_descriptor) {
----------------
--


================
Comment at: llvm/test/CodeGen/SPIRV/transcoding/enqueue_kernel.ll:280
+
+; Function Attrs: nounwind
+define spir_kernel void @__device_side_enqueue_block_invoke_kernel(i8 addrspace(4)* %0) {
----------------
--


================
Comment at: llvm/test/CodeGen/SPIRV/transcoding/enqueue_kernel.ll:289
+
+; Function Attrs: convergent noinline nounwind optnone
+define internal spir_func void @__device_side_enqueue_block_invoke_2(i8 addrspace(4)* noundef %.block_descriptor) {
----------------
--


================
Comment at: llvm/test/CodeGen/SPIRV/transcoding/enqueue_kernel.ll:312
+
+; Function Attrs: nounwind
+define spir_kernel void @__device_side_enqueue_block_invoke_2_kernel(i8 addrspace(4)* %0) {
----------------
--


================
Comment at: llvm/test/CodeGen/SPIRV/transcoding/enqueue_kernel.ll:321
+
+; Function Attrs: convergent noinline nounwind optnone
+define internal spir_func void @__device_side_enqueue_block_invoke_3(i8 addrspace(4)* noundef %.block_descriptor, i8 addrspace(3)* noundef %p) {
----------------
--


================
Comment at: llvm/test/CodeGen/SPIRV/transcoding/enqueue_kernel.ll:334
+
+; Function Attrs: nounwind
+define spir_kernel void @__device_side_enqueue_block_invoke_3_kernel(i8 addrspace(4)* %0, i8 addrspace(3)* %1) {
----------------
--


================
Comment at: llvm/test/CodeGen/SPIRV/transcoding/enqueue_kernel.ll:343
+
+; Function Attrs: convergent noinline nounwind optnone
+define internal spir_func void @__device_side_enqueue_block_invoke_4(i8 addrspace(4)* noundef %.block_descriptor, i8 addrspace(3)* noundef %p1, i8 addrspace(3)* noundef %p2, i8 addrspace(3)* noundef %p3) {
----------------
--


================
Comment at: llvm/test/CodeGen/SPIRV/transcoding/enqueue_kernel.ll:360
+
+; Function Attrs: nounwind
+define spir_kernel void @__device_side_enqueue_block_invoke_4_kernel(i8 addrspace(4)* %0, i8 addrspace(3)* %1, i8 addrspace(3)* %2, i8 addrspace(3)* %3) {
----------------
--


================
Comment at: llvm/test/CodeGen/SPIRV/transcoding/enqueue_kernel.ll:369
+
+; Function Attrs: convergent noinline nounwind optnone
+define internal spir_func void @__device_side_enqueue_block_invoke_5(i8 addrspace(4)* noundef %.block_descriptor) {
----------------
--


================
Comment at: llvm/test/CodeGen/SPIRV/transcoding/enqueue_kernel.ll:392
+
+; Function Attrs: nounwind
+define spir_kernel void @__device_side_enqueue_block_invoke_5_kernel(i8 addrspace(4)* %0) {
----------------
--


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137018/new/

https://reviews.llvm.org/D137018



More information about the llvm-commits mailing list