[PATCH] D15665: GlobalsAA: InaccessibleMemOnly does not mean ReadNone.
Vaivaswatha Nagaraj via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 4 18:38:27 PST 2016
vaivaswatha added a comment.
In http://reviews.llvm.org/D15665#319247, @reames wrote:
> I'm really not sure inaccessible memonly belongs in GlobalsAA at all. Particularly since we haven't added even basis cases to BasicAA.
>
> In general, I think we need to be really careful when implementing this. It's fair to say that the call doesn't modify or read any *particular* LLVM value, but I'm not sure our aliasing model is correct if we say that it can't read *any* LLVM value. In particular, as you point out, inaccessiblememonly may still be modifying memory and have memory dependence.
I understand we need to be careful while using this attribute. So far, GlobalsModRef is the only analysis that actually uses it. "inaccessiblememonly" does access memory (not visible in the module) and it does cause memory dependence. However, this dependence is not ignored. Adding the check (in this change) just ensures that GlobalsAA maintains info for the function and does not immediately discard it. I had mistakenly added it in the other place in an earlier commit and am correcting that now.
http://reviews.llvm.org/D15665
More information about the llvm-commits
mailing list