<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On Mar 19, 2014, at 5:34 AM, Eli Bendersky <<a href="mailto:eliben@google.com">eliben@google.com</a>> wrote:<br><div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;"><div class="">><br>
> The "noduplicate" function attribute exists to prevent certain optimizations<br>
> from duplicating calls to the function. This is important on platforms where<br>
> certain function call duplications are unsafe (for example execution barriers<br>
> for CUDA and OpenCL).<br>
><br>
> This patch makes it possible to specify intrinsics as "noduplicate" and<br>
> translates that to the appropriate function attribute.<br>
<br>
</div>Hi Eli,<br>
<br>
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?<br>

</blockquote><div><br></div><div>I think Owen and Chandler covered most of the background; just for completeness, the original discussion of the patch earlier this week is in <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140317/209081.html">http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140317/209081.html</a> - 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.</div>

</div></div></div></blockquote><br></div><div>Got it, my confusion, thanks!</div><div><br></div><div>-Chris</div><br></body></html>