[LLVMdev] mem2reg optimization
David Greene
dag at cray.com
Tue Oct 7 09:04:11 PDT 2008
On Monday 06 October 2008 12:22, Chris Lattner wrote:
> >> Does this seem like a reasonable approach? If so, please split the
> >> various parts of mem2reg out into helper methods as a prepatch. This
> >> will make review of the subsequent changes much easier.
> >
> > Which various parts are you referring to? You mean the stuff that
> > populates
> > and updates the map?
>
> I'm criticizing the existing code :), which is just very poorly
> structured. It would be nice to do a refactoring patch first which
> just splits the various "scan a BB" places out into helper methods,
> instead of them being inlined into larger pieces of code. This will
> make the mem2reg algo easier to read and will make the algorithmic
> change easier to review.
Ok, I think I see what you mean.
> If you want, I can change one of the places that does a scan to show
> what I mean,
If you'd like. I probably won't get to that kind of refactoring until next
week.
-Dave
More information about the llvm-dev
mailing list