search for: how_do_you_represent_this_in_ir

Displaying 9 results from an estimated 9 matches for "how_do_you_represent_this_in_ir".

2012 Sep 12
2
[LLVMdev] SPIR Portability Discussion
> > OpenCL 1.2 (6.3)/k says the result of sizeof is an ICE. So these are valid: > > int does_this_compile[sizeof(void*) - 3]; > > struct how_do_you_represent_this_in_IR { > int a : 1; > int b : sizeof(void*) * 4; > }; > > Is OpenCL going to be changed to reject these cases? > I don't think that they plan to allow it. I am not sure how much value dynamic sized bitfields bring to OpenCL users. In theory they could use opaque types and a...
2012 Sep 12
0
[LLVMdev] SPIR Portability Discussion
...cfe-dev at cs.uiuc.edu; llvmdev at cs.uiuc.edu > Subject: Re: [LLVMdev] SPIR Portability Discussion > > > > > OpenCL 1.2 (6.3)/k says the result of sizeof is an ICE. So these are > valid: > > > > int does_this_compile[sizeof(void*) - 3]; > > > > struct how_do_you_represent_this_in_IR { > > int a : 1; > > int b : sizeof(void*) * 4; > > }; > > > > Is OpenCL going to be changed to reject these cases? > > > > I don't think that they plan to allow it. I am not sure how much value > dynamic sized bitfields bring to OpenCL users. &...
2012 Sep 12
0
[LLVMdev] SPIR Portability Discussion
...alues of the sizeof operator. > These functions should be resolved by the device backend compiler when > producing the final machine code of the OpenCL program. > OpenCL 1.2 (6.3)/k says the result of sizeof is an ICE. So these are valid: int does_this_compile[sizeof(void*) - 3]; struct how_do_you_represent_this_in_IR { int a : 1; int b : sizeof(void*) * 4; }; Is OpenCL going to be changed to reject these cases? How do you perform record layout if the size of a pointer is unknown? For instance: struct A { int *p; int n; } a; int arr[offsetof(A, n) - 3]; // or, int arr[(char*)&a.n - (char*)&a....
2012 Sep 14
2
[LLVMdev] SPIR Review Status: after Introduction and 32bits vs. 64bits discussions
...Smith, Eli Friedman & Nadav Rotem: Portability Issues *** *****comment 1: int does_this_compile[sizeof(void*) - 3]; Answer: We are discussing this internally and will provide an answer soon. ****comment 2: struct how_do_you_represent_this_in_IR {   int a : 1;   int b : sizeof(void*) * 4; }; Answer: Bitfields are disallowed in OpenCL “C” ****comment 3: How do you perform record layout if the size of a pointer is...
2012 Sep 19
0
[LLVMdev] [cfe-dev] SPIR Review Status: after Introduction and 32bits vs. 64bits discussions
...Smith, Eli Friedman & Nadav Rotem: Portability Issues *** *****comment 1: int does_this_compile[sizeof(void*) - 3]; Answer: We are discussing this internally and will provide an answer soon. ****comment 2: struct how_do_you_represent_this_in_IR {   int a : 1;   int b : sizeof(void*) * 4; }; Answer: Bitfields are disallowed in OpenCL “C” ****comment 3: How do you perform record layout if the size of a pointer is...
2012 Sep 12
5
[LLVMdev] SPIR Portability Discussion
Hey All, This is a very big topic in SPIR and probably a very controversial one as well. It includes dealing with 32 vs. 64 bit architectures and OpenCL "C" endianness. We have written down some of the aspects, but of course did not cover everything - let's start a discussion on the portability and see where it takes us. I suggest we start with the 32 vs. 64 bits discussion and then
2012 Sep 19
1
[LLVMdev] [cfe-dev] SPIR Review Status: after Introduction and 32bits vs. 64bits discussions
...; > *** Richard Smith, Eli Friedman & Nadav Rotem: Portability Issues *** > > *****comment 1: int does_this_compile[sizeof(void*) - 3]; > Answer: We are discussing this internally and will provide an answer soon. > > ****comment 2: struct how_do_you_represent_this_in_IR { > int a : 1; > int b : sizeof(void*) * 4; > }; > Answer: Bitfields are disallowed in OpenCL “C” > > ****comment 3: How do you perform record layout...
2012 Sep 27
0
[LLVMdev] SPIR: Answers to the issues raised so far
...*****comment 1: int does_this_compile[sizeof(void*) - 3]; Answer: In this scenario the sizeof(void*) is no longer a frontend compile time constant. This case is not supported, and a compile time error should be raised by a SPIR frontend ****comment 2: struct how_do_you_represent_this_in_IR { int a : 1; int b : sizeof(void*) * 4; }; Answer: Bitfields are disallowed in OpenCL "C" ****comment 3: How do you perform record layout if the size...
2012 Sep 12
2
[LLVMdev] SPIR Portability Discussion
...ence on instructions %1 = call %spir.size_t @__spir_sizet_convert_size_t(i32 3) %2 = call %spir.size_t @__spir_size_of_sizet() %3 = call %spir.size_t @__spir_sizet_sub(%spir.size_t %1, %spir.size_t %2) %4 = call %spir.size_t @__spir_sizet_convert_i32(%spir.size_t %3) %5 = alloca i32, i32 %4 struct how_do_you_represent_this_in_IR { int a : 1; int b : sizeof(void*) * 4; }; [Villmow, Micah] Bitfields are illegal in OpenCL (See 6.9.c); Is OpenCL going to be changed to reject these cases? How do you perform record layout if the size of a pointer is unknown? For instance: struct A { int *p; int n; } a; int arr[offset...