<div dir="ltr">Hi Arnaud,<div><br></div><div>I'm not sure the definition of volatile is sufficiently wide to allow the changing of a reference into a modification or vice versa? volatility at this level is just to do with expected memory access ordering AIUI. I understand being conservative in this case but I'm not 100% convinced we need to be *that* conservative.</div><div><br></div><div>James</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 14 Sep 2015 at 16:02 Arnaud de Grandmaison 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">aadg added a subscriber: aadg.<br>
aadg added a comment.<br>
<br>
Hi James,<br>
<br>
See comment below.<br>
<br>
<br>
================<br>
Comment at: lib/Analysis/GlobalsModRef.cpp:776-782<br>
@@ +775,9 @@<br>
+ default:<br>
+ return MRI_ModRef;<br>
+ case Intrinsic::memset:<br>
+ return (Operands[0] ? MRI_Mod : MRI_NoModRef);<br>
+ case Intrinsic::memcpy:<br>
+ case Intrinsic::memmove:<br>
+ return static_cast<ModRefInfo>((Operands[0] ? MRI_Mod : MRI_NoModRef) |<br>
+ (Operands[1] ? MRI_Ref : MRI_NoModRef));<br>
+ }<br>
----------------<br>
Shouldn't we also handle the isVolatile argument ? As anything could happen when this is a volatile operation, I think we should always return MRI_ModRef when it is set.<br>
<br>
<br>
Repository:<br>
rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D12838" rel="noreferrer" target="_blank">http://reviews.llvm.org/D12838</a><br>
<br>
<br>
<br>
_______________________________________________<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>