nhaehnle added a comment.

In D74935#1887245 <https://reviews.llvm.org/D74935#1887245>, @efriedma wrote:

> In D74935#1886020 <https://reviews.llvm.org/D74935#1886020>, @nhaehnle wrote:
>
> > I find this phrasing pretty confusing. How about the following:
> >
> > > This indicates that objects accessed via pointer values based on the 
> > > argument or return value are not **modified**, during the execution of 
> > > the function, via pointer values not based on the argument or return 
> > > value. [...]
>
>
> This isn't equivalent.  If the memory location is modified, we want to forbid 
> both reads and writes that aren't based on the noalias pointer.


Oh I see. So another way to put this is:

- If an object is accessed via a pointer based on the noalias argument, then it 
cannot be modified via other pointer values.
- If an object is modified via a pointer based on the noalias argument, then it 
cannot be accessed via other pointer values in any way.

Correct? I think it's useful to spell it out like this, because it makes the 
alias implications clearer (at least to me).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74935/new/

https://reviews.llvm.org/D74935



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to