[llvm-commits] Intrinsic address space patch

Mon P Wang monping at apple.com
Wed Jul 23 10:14:02 PDT 2008


Hi Dan,

Thanks for the comments and I'll make those changes.  I'm going to  
submit a new patch for this as I made it a little bit more  
complicated.  I added the capability to distinguish between those  
intrinsics that wanted to overload on the address space for a pointer  
vs those we didn't.

   -- Mon Ping

On Jul 23, 2008, at 8:44 AM, Dan Gohman wrote:

> Hi Mon Ping,
>
> Sorry for the delay on this patch. It looks good; I just have a few
> minor style comments.
>
> -  // suffix, to be checked at the end.
> +  // suffix, to be checked at the end.  A function with a pointer
> argument may
> +  // or may not be overload.
>
> s/overload/overloaded/
>
> +      }
> +      else {
>
> LLVM style has the else on the same line as the }.
>
> -        F->setName("llvm.atomic.cmp.swap"+Name.substr(delim));
> +        F->setName( "llvm.atomic.cmp.swap" + Name.substr(delim)
> +                   + ".p0" + Name.substr(delim+1));
>
> A spurious space after a paren, and LLVM style has operators at
> line breaks on the preceding line.
>
> Dan
>
> On Thu, July 17, 2008 3:56 pm, Mon P Wang wrote:
>>
>> Here is a patch to enable intrinsic to have pointers to different
>> address spaces.  This changes overloaded intrinsics with pointer
>> arguments to pass also an address space as part of their name.
>>    For example,  atomic.load.add.i32 => atomic.load.add.i32.p0i32
>>
>> The above syntax indicates that the result is i32 with a pointer
>> argument to address space 0 (generic address space) whose domain type
>> is i32.  The patch here doesn't include the documentation change but
>> that will be included as part of the checkin.  Let me know if you  
>> have
>> any comments.
>>
>> -- Mon Ping
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list