[PATCH] D44160: [GVN] Detect fully redundant loads when we have more than one available value

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 12 21:18:11 PDT 2018


In particular, i feel this way because GVN should already get your case
without this.
The fact that it doesn't is an issue with AA.
Working around it like this only fixes GVN's ability to optimize this.
There will be plenty of cases something *else* could  eliminate code like
that will not be able to
Fixing AA fixes it for everyone (and doesn't require pass-specific
workarounds).

So i'd like to understand what is going wrong in AA before we start trying
to hack around it in GVN.

On Mon, Mar 12, 2018 at 9:08 AM, Daniel Berlin via Phabricator <
reviews at reviews.llvm.org> wrote:

> dberlin added a comment.
>
> So this looks like a really weird optimization to avoid AA being broken.
> As you say, the code it inserts will be fixed up later (and you are taking
> an O(1) function and making it O(N).
> We should just fix AA.
>
> It should see no difference between the two.
> If we really can't fix AA, i'd like to understand why before we go this
> route.
> Because we shouldnt' be working around these problems this way.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D44160
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180312/2a71cc6f/attachment.html>


More information about the llvm-commits mailing list