Displaying 4 results from an estimated 4 matches for "loadgs2".
2013 Aug 08
0
[LLVMdev] Address space extension
...d require an explicit address space cast. To illustrate the problem, consider the following trivial example:
typedef __attribute__((address_space(256))) int* gsptr;
int *toglobal(gsptr foo)
{
return (int*)foo;
}
int load(int *foo)
{
return *foo;
}
int loadgs(gsptr foo)
{
return *foo;
}
int loadgs2(gsptr foo)
{
return *toglobal(foo);
}
When we compile this to LLVM IR with clang (disabling asynchronous unwind tables for clarity), at -O2 we get this:
define i32* @toglobal(i32 addrspace(256)* %foo) nounwind readnone ssp {
%1 = bitcast i32 addrspace(256)* %foo to i32*
ret i32* %1
}
define...
2013 Aug 08
4
[LLVMdev] Address space extension
On Aug 7, 2013, at 7:23 PM, Michele Scandale <michele.scandale at gmail.com> wrote:
> On 08/08/2013 03:52 AM, Pete Cooper wrote:
>>> Why a backend should be responsible (meaning have knowledge) for a
>>> mapping between high level address spaces and low level address spaces?
>> Thats true. I’m thinking entirely from the persecutive of the backend
>> doing
2013 Aug 08
2
[LLVMdev] Address space extension
...ng trivial example:
>
> typedef __attribute__((address_space(256))) int* gsptr;
>
> int *toglobal(gsptr foo)
> {
> return (int*)foo;
> }
>
> int load(int *foo)
> {
> return *foo;
> }
>
> int loadgs(gsptr foo)
> {
> return *foo;
> }
>
> int loadgs2(gsptr foo)
> {
> return *toglobal(foo);
> }
>
> When we compile this to LLVM IR with clang (disabling asynchronous unwind tables for clarity), at -O2 we get this:
>
> define i32* @toglobal(i32 addrspace(256)* %foo) nounwind readnone ssp {
> %1 = bitcast i32 addrspace(256...
2013 Aug 08
0
[LLVMdev] Address space extension
...;>
>> int *toglobal(gsptr foo)
>> {
>> return (int*)foo;
>> }
>>
>> int load(int *foo)
>> {
>> return *foo;
>> }
>>
>> int loadgs(gsptr foo)
>> {
>> return *foo;
>> }
>>
>> int loadgs2(gsptr foo)
>> {
>> return *toglobal(foo);
>> }
>>
>> When we compile this to LLVM IR with clang (disabling asynchronous unwind
>> tables for clarity), at -O2 we get this:
>>
>> define i32* @toglobal(i32 addrspace(256)* %foo) nounwind readnone...