[llvm] r204200 - Expose "noduplicate" attribute as a property for intrinsics.

Eli Bendersky eliben at google.com
Wed Mar 19 05:34:19 PDT 2014


On Tue, 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?
>

I think Owen and Chandler covered most of the background; just for
completeness, the original discussion of the patch earlier this week is in
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140317/209081.html-
the email introducing the patch has a little bit more detail than the
commit message. Perhaps I could have incorporated it into the commit
message to make it clearer.

Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140319/86564bf5/attachment.html>


More information about the llvm-commits mailing list