<div dir="ltr">Hi Sanjoy,<div><br></div><div>The lazy lambda idea is a good one, I'll implement that, thanks.</div><div><br></div><div>readonly/readnone: Yes, I think so. That'd be a simple addition.</div><div><br></div><div>Hal - I'm not certain I understand why having nocapture better supported is a more general issue than this and not an orthogonal one. Nocapture can tell us about the escapability of a pointer, sure, and what you suggest seems a sensible addition to GMR (allows us to catch more cases of non-escaping private globals). But this patch is really looking at mod/ref behavior, and nocapture can't help us there.</div><div><br></div><div>Were you suggesting it as a general improvement or something you'd specifically like to see in this patch?</div><div><br></div><div>Cheers,</div><div><br></div><div>James</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 14 Sep 2015 at 17:19 Sanjoy Das 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">sanjoy added a subscriber: sanjoy.<br>
<br>
================<br>
Comment at: lib/Analysis/GlobalsModRef.cpp:771<br>
@@ +770,3 @@<br>
+ SmallVector<bool,4> Operands;<br>
+ for (auto &U : CS.args())<br>
+ Operands.push_back(GetUnderlyingObject(&*U, DL) == GV);<br>
----------------<br>
I'd rather have this be a lambda that takes an argument index instead of an eagerly populated vector, given that for most intrinsics this isn't used.<br>
<br>
================<br>
Comment at: lib/Analysis/GlobalsModRef.cpp:776<br>
@@ +775,3 @@<br>
+ default:<br>
+ return MRI_ModRef;<br>
+ case Intrinsic::memset:<br>
----------------<br>
aadg wrote:<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>
Can we do something more precise here if the intrinsic is readonly or readnone?<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>