Reg2Mem pass

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. -_-;

Thanks,
Seung J. Lee

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