[LLVMdev] Reg2mem: Identifying introduced memory locations (also, what happens to the phi nodes)

Duncan Sands baldrick at free.fr
Mon May 30 13:23:43 PDT 2011


Hi Alexey,

> 1. How would I tell which memory locations were introduced by the
> pass, and which memory locations were present in the original program?
> After a brief diffing of .ll files, I'd suppose that introduced
> "alloca"s would put their result in a variable named
> "somename.reg2mem". But is the ".reg2mem" suffix a reliable way to
> identify introduced allocas?

as a general rule you shouldn't make any use of names.  For example,
it is perfectly possible for instructions to have no names.

> 2. There seems to be no "phi" instructions after the pass. Does the
> pass always remove all "phi" instructions?

I believe so.  In fact I think that's the point of this pass.

Ciao, Duncan.



More information about the llvm-dev mailing list