[LLVMdev] Reg2Mem pass

Andrew Lenharth andrewl at lenharth.org
Fri Aug 10 13:09:50 PDT 2007


On 8/10/07, Reid Spencer <rspencer at reidspencer.com> wrote:
> On Fri, 2007-08-10 at 00:51 -0500, Seung Jae Lee wrote:
> > Hi, guys.
> >
> > I'm interested in using reg2mem pass but not sure about the concept of it.
> > Can you let me know a reference about it, if any?
> > Forgive my ignorance. -_-;
>
> The reg2mem pass undoes SSA form. That is, it turns SSA registers into
> alloca instructions with loads and stores.

With the exception that there still are some phis.  I don't remember
the issues leading up still having them, but they are much easier to
deal with I recall (I think it ensures that the phi is only taking
values defined in the immediate predessor, rather than an arbirary
dominator.

Andrew



More information about the llvm-dev mailing list