search for: spir_func

Displaying 13 results from an estimated 13 matches for "spir_func".

2016 Sep 12
2
builtins name mangling in SPIR 2.0
...s: > > > > define spir_kernel void @input_zip_int(i32 addrspace(1)* nocapture %in0) > local_unnamed_addr #0 !kernel_arg_addr_space !3 !kernel_arg_access_qual !4 > !kernel_arg_type !5 !kernel_arg_base_type !5 !kernel_arg_type_qual !6 { > > entry: > > %call = tail call spir_func i128 @get_global_id(i32 0) #2 > > %conv = trunc i128 %call to i32 > > store i32 %conv, i32 addrspace(1)* %in0, align 4, !tbaa !7 > > ret void > > } > > > > In this case, get_global_id is not mangled to _Z13get_global_idj according > to [2]. > > &gt...
2016 Sep 16
2
builtins name mangling in SPIR 2.0
...t from the standard, which is printf(restrict __constant char *, ...)) I try the following code: #include <opencl-c.h> __kernel void vadd(__global const int* a, __global const int* b, __global int* c) { printf("aaaaa"); } and get a printf that is not mangled: %call = tail call spir_func i32 (i8 addrspace(2)*, ...) @printf(i8 addrspace(2)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(2)* @.str, i64 0, i64 0)) with the following command line: clang -cc1 -internal-isystem /wrk/xsjhdnobkup2/hongbinz/omp/build-llvm/bin/../lib/clang/3.9.0/include -nostdsysteminc -S -emit-llvm -...
2016 Sep 12
2
builtins name mangling in SPIR 2.0
...0) { *in0 = get_global_id(0); } clang generates: define spir_kernel void @input_zip_int(i32 addrspace(1)* nocapture %in0) local_unnamed_addr #0 !kernel_arg_addr_space !3 !kernel_arg_access_qual !4 !kernel_arg_type !5 !kernel_arg_base_type !5 !kernel_arg_type_qual !6 { entry: %call = tail call spir_func i128 @get_global_id(i32 0) #2 %conv = trunc i128 %call to i32 store i32 %conv, i32 addrspace(1)* %in0, align 4, !tbaa !7 ret void } In this case, get_global_id is not mangled to _Z13get_global_idj according to [2]. Is there an option for clang or an LLVM clang to do the mangling for spir bu...
2016 Sep 18
2
builtins name mangling in SPIR 2.0
...t from the standard, which is printf(restrict __constant char *, ...)) I try the following code: #include <opencl-c.h> __kernel void vadd(__global const int* a, __global const int* b, __global int* c) { printf("aaaaa"); } and get a printf that is not mangled: %call = tail call spir_func i32 (i8 addrspace(2)*, ...) @printf(i8 addrspace(2)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(2)* @.str, i64 0, i64 0)) with the following command line: clang -cc1 -internal-isystem /wrk/xsjhdnobkup2/hongbinz/omp/build-llvm/bin/../lib/clang/3.9.0/include -nostdsysteminc -S -emit-llvm -...
2018 Nov 29
2
AliasAnalysis does not look though a memcpy
Hi, I'm trying to get AA results for two pointers, but it seems that AA cannot look though a memcpy. For example: define dso_local spir_func void @fun() { entry: ; Store an address of `var' %var = alloca i32, align 4 store i32 42, i32* %var, align 4 %var.addr = alloca i32*, align 8 store i32* %var, i32** %var.addr, align 8 ; Memcpy `var.addr' to `var.addr.tmp' %var.addr.tmp = al...
2018 Dec 05
2
AliasAnalysis does not look though a memcpy
On 12/5/18 9:51 AM, Andrew Savonichev via llvm-dev wrote: >> Hi, >> >> I'm trying to get AA results for two pointers, but it seems that AA >> cannot look though a memcpy. For example: >> >> define dso_local spir_func void @fun() { >> entry: >> ; Store an address of `var' >> %var = alloca i32, align 4 >> store i32 42, i32* %var, align 4 >> %var.addr = alloca i32*, align 8 >> store i32* %var, i32** %var.addr, align 8 >> >>...
2018 Dec 05
2
AliasAnalysis does not look though a memcpy
...On 12/5/18 9:51 AM, Andrew Savonichev via llvm-dev wrote: >>>> Hi, >>>> >>>> I'm trying to get AA results for two pointers, but it seems that AA >>>> cannot look though a memcpy. For example: >>>> >>>> define dso_local spir_func void @fun() { >>>> entry: >>>> ; Store an address of `var' >>>> %var = alloca i32, align 4 >>>> store i32 42, i32* %var, align 4 >>>> %var.addr = alloca i32*, align 8 >>>> store i32* %var,...
2015 Jan 28
3
[LLVMdev] Inconsistencies or intended behaviour of LLVM IR?
...he following calling conventions are valid tokens but not described in the language references as of revision 223189: intel_ocl_bicc, x86_stdcallcc, x86_fastcallcc, x86_thiscallcc, kw_x86_vectorcallcc, arm_apcscc, arm_aapcscc, arm_aapcs_vfpcc, msp430_intrcc, ptx_kernel, ptx_device, spir_kernel, spir_func, x86_64_sysvcc, x86_64_win64cc, kw_ghccc Lastly I'd just like to thank the LLVM developers for all the time and hard work they've put into this project. I'd especially like to thank you for providing a language specification along side of the reference implementation! Keeping it...
2015 Jan 28
0
[LLVMdev] Inconsistencies or intended behaviour of LLVM IR?
...cribed in >>> the language references as of revision 223189: >>> >>> intel_ocl_bicc, x86_stdcallcc, x86_fastcallcc, x86_thiscallcc, >>> kw_x86_vectorcallcc, arm_apcscc, arm_aapcscc, arm_aapcs_vfpcc, >>> msp430_intrcc, ptx_kernel, ptx_device, spir_kernel, spir_func, >>> x86_64_sysvcc, x86_64_win64cc, kw_ghccc >>> >>> >>> This is just bitrot. >> >> -- Sean Silva >> >> >> >>> >>> Lastly I'd just like to thank the LLVM developers for all the time and >>> hard work t...
2019 Apr 12
3
Generating C headers from LLVM
Hi List, is there any way to generate proper C header files for functions that are defined in LLVM-IR. My current attempts fail when clang does some fancy transformations (to adhere to some ABIs ??), e.g., for returning a struct. For example the declaration typedef struct {int64_t a; int64_t b;int64_t c;} test; test create_test(void);yields the LLVM code %struct.test = type { i64, i64, i64 }
2015 Jan 28
4
[LLVMdev] Inconsistencies or intended behaviour of LLVM IR?
...d tokens but not described in >> the language references as of revision 223189: >> >> intel_ocl_bicc, x86_stdcallcc, x86_fastcallcc, x86_thiscallcc, >> kw_x86_vectorcallcc, arm_apcscc, arm_aapcscc, arm_aapcs_vfpcc, >> msp430_intrcc, ptx_kernel, ptx_device, spir_kernel, spir_func, >> x86_64_sysvcc, x86_64_win64cc, kw_ghccc >> >> > This is just bitrot. > > -- Sean Silva > > >> >> >> Lastly I'd just like to thank the LLVM developers for all the time and >> hard work they've put into this project. I'd especia...
2019 Apr 12
2
Generating C headers from LLVM
...example below: ******* INPUT ****** struct S { int a; int b; }; int foo(struct S s) { return s.a + s.b + sizeof(long); } **** INPUT END ***** ****** SPIR IR ****** target triple = "spir" %struct.S = type { i32, i32 } ; Function Attrs: noinline nounwind optnone define dso_local spir_func i32 @foo(%struct.S* byval align 4 %s) #0 { entry: %a = getelementptr inbounds %struct.S, %struct.S* %s, i32 0, i32 0 %0 = load i32, i32* %a, align 4 %b = getelementptr inbounds %struct.S, %struct.S* %s, i32 0, i32 1 %1 = load i32, i32* %b, align 4 %add = add nsw i32 %0, %1 %add1 = add i...
2015 Feb 02
2
[LLVMdev] Inconsistencies or intended behaviour of LLVM IR?
...3189: >>>>>>> >>>>>>> intel_ocl_bicc, x86_stdcallcc, x86_fastcallcc, x86_thiscallcc, >>>>>>> kw_x86_vectorcallcc, arm_apcscc, arm_aapcscc, arm_aapcs_vfpcc, >>>>>>> msp430_intrcc, ptx_kernel, ptx_device, spir_kernel, spir_func, >>>>>>> x86_64_sysvcc, x86_64_win64cc, kw_ghccc >>>>>>> >>>>>>> >>>>>>> This is just bitrot. >>>>>>> >>>>>>> >>>>>> -- Sean Silva >>>>>&...