[LLVMdev] mem2reg optimization

David Greene dag at cray.com
Fri Sep 26 09:13:30 PDT 2008


On Friday 26 September 2008 10:56, Andrew Lenharth wrote:
> On Fri, Sep 26, 2008 at 10:41 AM, David Greene <dag at cray.com> wrote:
> > On Thursday 25 September 2008 13:15, David Greene wrote:
> >> I like your approach of using the use lists but I'm not sure the
> >> ordering is guaranteed.  If it is, your approach is superior.
> >
> > I got my patch updated to work with TOT.  Here it is.  Comments welcome.
> > I still prefer Nicolas' solution if his use list ordering assumption is
> > valid.
>
> Isn't the ordering an artifact of the creation of the users?  If you

I think so.

> run mem2reg after other optimizations, why would you still have any
> ordering guarantees?

Yes, that's exactly what I'm worried about and why I didn't use the use lists 
in my solution.

I'll check in my patch if folks find it acceptable.  It was done pretty 
quickly so I may make another pass over it to clean it up a bit.

                                                     -Dave



More information about the llvm-dev mailing list