File: clk_event_t.ll

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (47 lines) | stat: -rw-r--r-- 2,279 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
; RUN: llc -O0 -opaque-pointers=0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV

; CHECK-SPIRV: OpTypeDeviceEvent
; CHECK-SPIRV: OpFunction
; CHECK-SPIRV: OpCreateUserEvent
; CHECK-SPIRV: OpIsValidEvent
; CHECK-SPIRV: OpRetainEvent
; CHECK-SPIRV: OpSetUserEventStatus
; CHECK-SPIRV: OpCaptureEventProfilingInfo
; CHECK-SPIRV: OpReleaseEvent
; CHECK-SPIRV: OpFunctionEnd

;; kernel void clk_event_t_test(global int *res, global void *prof) {
;;   clk_event_t e1 = create_user_event();
;;   *res = is_valid_event(e1);
;;   retain_event(e1);
;;   set_user_event_status(e1, -42);
;;   capture_event_profiling_info(e1, CLK_PROFILING_COMMAND_EXEC_TIME, prof);
;;   release_event(e1);
;; }

%opencl.clk_event_t = type opaque

define dso_local spir_kernel void @clk_event_t_test(i32 addrspace(1)* nocapture noundef writeonly %res, i8 addrspace(1)* noundef %prof) local_unnamed_addr {
entry:
  %call = call spir_func %opencl.clk_event_t* @_Z17create_user_eventv()
  %call1 = call spir_func zeroext i1 @_Z14is_valid_event12ocl_clkevent(%opencl.clk_event_t* %call)
  %conv = zext i1 %call1 to i32
  store i32 %conv, i32 addrspace(1)* %res, align 4
  call spir_func void @_Z12retain_event12ocl_clkevent(%opencl.clk_event_t* %call)
  call spir_func void @_Z21set_user_event_status12ocl_clkeventi(%opencl.clk_event_t* %call, i32 noundef -42)
  call spir_func void @_Z28capture_event_profiling_info12ocl_clkeventiPU3AS1v(%opencl.clk_event_t* %call, i32 noundef 1, i8 addrspace(1)* noundef %prof)
  call spir_func void @_Z13release_event12ocl_clkevent(%opencl.clk_event_t* %call)
  ret void
}

declare spir_func %opencl.clk_event_t* @_Z17create_user_eventv() local_unnamed_addr

declare spir_func zeroext i1 @_Z14is_valid_event12ocl_clkevent(%opencl.clk_event_t*) local_unnamed_addr

declare spir_func void @_Z12retain_event12ocl_clkevent(%opencl.clk_event_t*) local_unnamed_addr

declare spir_func void @_Z21set_user_event_status12ocl_clkeventi(%opencl.clk_event_t*, i32 noundef) local_unnamed_addr

declare spir_func void @_Z28capture_event_profiling_info12ocl_clkeventiPU3AS1v(%opencl.clk_event_t*, i32 noundef, i8 addrspace(1)* noundef) local_unnamed_addr

declare spir_func void @_Z13release_event12ocl_clkevent(%opencl.clk_event_t*) local_unnamed_addr