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

Chris Lattner clattner at apple.com
Wed Mar 19 11:57:10 PDT 2014


On Mar 19, 2014, at 5:34 AM, Eli Bendersky <eliben at google.com> wrote:
> >
> > 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.

Got it, my confusion, thanks!

-Chris

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


More information about the llvm-commits mailing list