[LLVMdev] Mixing noalias and regular arguments

Kuperstein, Michael M michael.m.kuperstein at intel.com
Tue May 21 08:23:07 PDT 2013

Hi all,

I'm trying to understand the semantics of noalias arguments, and I'm not entirely sure I got it correctly.
To the best of my understanding, if an argument is declared noalias, "This indicates that pointer values based on the argument do not alias pointer values which are not based on it" implies, among other things, that it cannot alias any other argument, even if that argument is NOT declared noalias.
However, currently, BasicAliasAnalysis doesn't recognize this case explicitly. Sometimes it will work for other reasons (e.g. if it knows the other argument does not get captured), but it's relatively easy to get circumstances where the result is MayAlias.

I'm attaching a patch that addresses this.
Can anyone offer an opinion on the basic issue and, assuming this is the desired behavior, on the patch?


Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130521/31c4effd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: noalias.diff
Type: application/octet-stream
Size: 2878 bytes
Desc: noalias.diff
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130521/31c4effd/attachment.obj>

More information about the llvm-dev mailing list