<div dir="ltr">Hi,<div><br></div><div>Ah, I had forgotten we have argmemonly now. Yes, that sounds like the right approach, but as Hal said I think the intrinsic list will need to be audited.</div><div><br></div><div>James</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, 12 May 2016 at 17:34 Daniel Berlin via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 12, 2016 at 8:46 AM, Tom Stellard <span dir="ltr"><<a href="mailto:thomas.stellard@amd.com" target="_blank">thomas.stellard@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">tstellarAMD added a comment.<br>
<span><br>
In <a href="http://reviews.llvm.org/D20206#428381" rel="noreferrer" target="_blank">http://reviews.llvm.org/D20206#428381</a>, @dberlin wrote:<br>
<br>
> So this is an interesting question.<br>
>  Outside of very specific intrinsics (barriers), or intrinsics passed global<br>
>  variables, which intrinsics do you believe can affect global variables and<br>
>  why?<br>
<br>
<br>
</span>There probably aren't many besides barriers and maybe some of the cache flushing intrinsics.<br>
<span><br>
> :)<br>
<br>
><br>
<br>
> (Because if the answer is "none", we should probably make the ability to<br>
<br>
>  read/write non-passed-in globals an intrinsic property that folks have to<br>
<br>
>  opt-in to)<br>
<br>
<br>
</span>My thinking is that is would be easier to treat intrinsics and functions the same rather than having to add an attribute that makes intrinsics behave like functions.  </blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br>Yes, sorry, didn't realize we could already use attributes on intrinsics, because i didn't look closely enough.</div><div>This sounds like the right plan.  </div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There are already attributes like: readnone, readonly, argmemonly that can be used to specify that an intrinsic won't access globals.  It doesn't seem like it is too much trouble to ask people to use those for intrinsics, and it looks like most intrinsics already are using these.<br></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Yes, though i don't think GlobalsModRef is using argmemonly like it should, or at least, i don't see it.</div><div><br></div><div><br></div></div></div></div>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>