<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Reading the comments for:<div><br><div><font class="Apple-style-span" face="Courier"><span class="Apple-tab-span" style="white-space:pre"> </span>AliasAnalysis::onlyAccessesArgPointees(...) and</font><div><font class="Apple-style-span" face="Courier"><span class="Apple-tab-span" style="white-space:pre"> </span>AliasAnalysis::<span class="Apple-tab-span" style="white-space:pre">doesAccessArgPointees</span>(...)</font></div><div><br></div><div>And uses of these signatures in FunctionAttrs.cpp such as:</div><div><br></div><div><font class="Apple-style-span" face="Courier"><span class="Apple-tab-span" style="white-space:pre"> </span>if (AliasAnalysis::onlyAccessesArgPointees(MRB)) {<br> // If the call does access argument pointees, check each argument. <br> if (AliasAnalysis::doesAccessArgPointees(MRB))</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div>Wouldn't AliasAnalysis::onlyAccessesArgPointees(...) being renamed something like:</div><div><br></div><div>AliasAnalysis::atMostAccessesArgPointees(...), be clearer?</div><div><br></div><div>The "only" prefix throws me off at least.</div><div><br></div><div>Sorry if this is noise.</div><div><br></div><div>Garrison</div><div><br></div><div><div><div>On Sep 10, 2011, at 14:26, Garrison Venn wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Thanks for the answer Nick. Now you got me on a chase through FunctionAttrs.cpp<br>trying to find out what analysis passes "... which answers no to everything", means. :-)<br><br>Garrison<br><br>On Sep 10, 2011, at 13:52, Nick Lewycky wrote:<br><br><blockquote type="cite">Nick Lewycky wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">I was sure that I remember "opt -functionattrs" being taught to do this,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">but I just tried it out and it doesn't. This is a missed optz'n<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">opportunity, testcase:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> @x = constant i32 0<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> define void @foo() {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> load i32* @x<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> ret void<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> }<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">is only marked readonly when it should be readnone. Could I interest you<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">in fixing that? :)<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Never mind, it's because the default AA is no-aa, which answers no to everything. "opt -basicaa -functionattrs" gets this testcase right (and the one that stores, too!)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Nick<br></blockquote><br></div></blockquote></div><br></div></div></div></body></html>