PATCH: Add "noduplicate" property for intrinsics and use it NVPTX synchronization intrinsics

Eli Bendersky eliben at google.com
Tue Mar 18 16:57:46 PDT 2014


Thanks for the review. r204200.


On Tue, Mar 18, 2014 at 4:17 PM, Bill Wendling <isanbard at gmail.com> wrote:

> LGTM.
>
> Small comment on the intrinsic-noduplicate.ll test. You can make it more
> robust by using the FileCheck regex thingies instead of hardcoding the ‘#0’
> for the attribute group. In this case, the test being so small it may not
> be worth it. I leave it up to you.
>

Done.

Eli















>
> -bw
>
> On Mar 18, 2014, at 10:08 AM, Eli Bendersky <eliben at google.com> wrote:
>
>
> On Tue, Mar 18, 2014 at 9:59 AM, Justin Holewinski <jholewinski at nvidia.com
> > wrote:
>
>>  This looks good to me, though sign-off from a maintainer of tablegen may
>> be necessary.
>>
>
> +CC Bill (attributes) and Jakob
>
>
>> This should be set for all barrier instructions in IntrinsicsNVVM.td.
>>
>
> Fair enough; updated patch attached.
>
> Eli
>
>
>
>>
>>
>> On 03/17/2014 05:09 PM, Eli Bendersky wrote:
>>
>> Hello,
>>
>>  The "noduplicate" function attribute exists to prevent certain
>> optimizations from duplicating calls to the function. This is important on
>> platforms where certain function call duplications are unsafe (for example
>> execution barriers for CUDA and OpenCL).
>>
>>  This patch make it possible to specify intrinsics as "noduplicate" and
>> translates that to the appropriate function attribute. It also uses it for
>> the int_cuda_syncthreads intrinsics. Tests are also added.
>>
>>  Justin: for now I just added it for the intrinsic directly visible from
>> CUDA source. Should this attribute be added to all int_nvvm_barrier0*
>> intrinsics as well?
>>
>>  PTAL
>>
>>  Eli
>>
>>
>>
>>
>>  ------------------------------
>>  This email message is for the sole use of the intended recipient(s) and
>> may contain confidential information.  Any unauthorized review, use,
>> disclosure or distribution is prohibited.  If you are not the intended
>> recipient, please contact the sender by reply email and destroy all copies
>> of the original message.
>>  ------------------------------
>>
>
> <intrinsics-noduplicate.2.patch>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140318/1b15b815/attachment.html>


More information about the llvm-commits mailing list