[PATCH] D18710: code hoisting using GVN

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 4 20:09:49 PDT 2016


https://github.com/dberlin/llvm-gvn-rewrite/tree/newgvn2

(and in particular,
https://github.com/dberlin/llvm-gvn-rewrite/blob/newgvn2/lib/Transforms/Scalar/NewGVN.cpp
)

I'm rewriting GVN.
MemorySSA, recently committed, was the first step along this route.

It's at the point where it works, it needs to be broken down again and
pieces sent for review.

in any case, you can see struct congruenceclass, and that tracks all the
expressions that belong to a given congruence class (the memberset).

It even tells you thinks that are equivalent to that congruence class in
subparts of the CFG, or can be coerced through type changes to be the same
as things in the class, etc.

Note: It catches 99% of the things GVN does, and plenty it doesn't. I have
no plans on porting every possible optimization to it (and that would
include code hoisting :P)



On Mon, Apr 4, 2016 at 12:40 PM, Aditya Kumar <hiraditya at msn.com> wrote:

> hiraditya added a comment.
>
>
>
> > (FWIW: New GVN already has such a mapping/structure. For each value, it
> can
>
> >  tell you all the member expressions of that value)
>
>
> Thanks for the feedback. You mention that 'new GVN', could you point where
> new GVN is.
> Are you referring to the LeaderTable?
>
> -Aditya
>
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D18710
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160404/33f4ea4f/attachment.html>


More information about the llvm-commits mailing list