[PATCH] D44891: [RFC][Memory Dependency Analysis] Not clobber load value by store if the store value won't change load content

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 28 10:40:35 PDT 2018


Sorry, again, i don't think this is a thing memdep should be doing.
If GVN can't handle this sanely, that's on GVN.
So i'm not going t approve this.


On Tue, Mar 27, 2018 at 11:16 PM, Shiva Chen via Phabricator <
reviews at reviews.llvm.org> wrote:

> shiva0217 added a comment.
>
> In https://reviews.llvm.org/D44891#1048252, @dberlin wrote:
>
> > This isn't correct in the face of atomics and volatiles, and IMHO,
> MemoryDependence should not be performing this optimization.
> >  If you want, teach GVN to requery MemDep in these cases.
>
>
> Hi @dberlin.
> The patch code will not apply when face atomics and volatiles due to
> MemoryDependence has atomic and volatile checking before entering this part.
> It detects the case in the summary, and then MemDep will not clobber
> "LItoSI" load value by store and then GVN could remove "QueryInst" load by
> requiring MemDep.
> So the patch will not perform optimization by itself, it will let GVN deal
> with it.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D44891
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180328/3aad1e28/attachment.html>


More information about the llvm-commits mailing list