[llvm] r204200 - Expose "noduplicate" attribute as a property for intrinsics.
Owen Anderson
resistor at mac.com
Tue Mar 18 23:29:23 PDT 2014
On Mar 18, 2014, at 10:22 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On Mar 18, 2014, at 4:51 PM, Eli Bendersky <eliben at google.com> wrote:
>
>> Author: eliben
>> Date: Tue Mar 18 18:51:07 2014
>> New Revision: 204200
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=204200&view=rev
>> Log:
>> Expose "noduplicate" attribute as a property for intrinsics.
>>
>> 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 makes it possible to specify intrinsics as "noduplicate" and
>> translates that to the appropriate function attribute.
>
> Hi Eli,
>
> Was this discussed somewhere? I missed the discussion on this, and this has non-obvious ramifications. Is it enough to teach code metrics that this isn't a duplicatable instruction, or does CUDA rely on stronger "no reorder" and "no merge" guarantees? How do you expect to implement these guarantees without scattering special cases throughout the optimizer?
Chris,
The NoDuplicate was added by James Molloy in r170704 back in Dec 2012, after a review from you: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121210/159185.html
AFAICT, Eli isn’t adding any new semantics here, just making it possible for intrinsics to be auto-marked as NoDuplicate.
—Owen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140318/7fc9d34b/attachment.html>
More information about the llvm-commits
mailing list