[LLVMdev] readnone
Garrison Venn
gvenn.cfe.dev at gmail.com
Sat Sep 10 13:19:25 PDT 2011
Reading the comments for:
AliasAnalysis::onlyAccessesArgPointees(...) and
AliasAnalysis::doesAccessArgPointees(...)
And uses of these signatures in FunctionAttrs.cpp such as:
if (AliasAnalysis::onlyAccessesArgPointees(MRB)) {
// If the call does access argument pointees, check each argument.
if (AliasAnalysis::doesAccessArgPointees(MRB))
Wouldn't AliasAnalysis::onlyAccessesArgPointees(...) being renamed something like:
AliasAnalysis::atMostAccessesArgPointees(...), be clearer?
The "only" prefix throws me off at least.
Sorry if this is noise.
Garrison
On Sep 10, 2011, at 14:26, Garrison Venn wrote:
> Thanks for the answer Nick. Now you got me on a chase through FunctionAttrs.cpp
> trying to find out what analysis passes "... which answers no to everything", means. :-)
>
> Garrison
>
> On Sep 10, 2011, at 13:52, Nick Lewycky wrote:
>
>> Nick Lewycky wrote:
>>> I was sure that I remember "opt -functionattrs" being taught to do this,
>>> but I just tried it out and it doesn't. This is a missed optz'n
>>> opportunity, testcase:
>>>
>>> @x = constant i32 0
>>> define void @foo() {
>>> load i32* @x
>>> ret void
>>> }
>>>
>>> is only marked readonly when it should be readnone. Could I interest you
>>> in fixing that? :)
>>
>> 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!)
>>
>> Nick
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110910/ffb9cbb8/attachment.html>
More information about the llvm-dev
mailing list