[llvm-commits] [llvm] r107109 - in /llvm/trunk: include/llvm/Analysis/AliasAnalysis.h include/llvm/Analysis/Passes.h lib/Analysis/AliasAnalysis.cpp lib/Analysis/BasicAliasAnalysis.cpp test/Analysis/BasicAA/interprocedural.ll

Dan Gohman gohman at apple.com
Fri Jul 2 17:04:50 PDT 2010


On Jul 1, 2010, at 11:52 PM, Nick Lewycky wrote:

> Dan Gohman wrote:
>> 
>> However, beyond classic path and context scoping, there's another sense of
>> scope that an alias query can have, the scope of a noalias keyword. noalias
>> on an argument indicates that argument's relationship with other pointers
>> within that function, but it isn't meaningful when considering pointers
>> from an interprocedural perspective. An example of this is this is the first
>> example I gave above, with alias(@G, %p).
> 
> I don't believe you. From the LangRef.html#paramattrs
> 
> "*noalias:* This indicates that the pointer does not alias any global or any other parameter. The caller is responsible for ensuring that this is the case. ..."


But clearly it's valid to call memcpy on a global variable. This works
because noalias doesn't care about things within the call interfering
with things outside the call.

I've now updated the documentation to more closely reflect reality;
feedback on these changes is welcome.

Dan





More information about the llvm-commits mailing list