How to insert phi

Hi,
I am new to llvm. I have project in llvm. For that I need SSA form,
which is already implemented in llvm. Basically I want to know which
pass insert phi and converts it to SSA form in llvm .

Regards,
Chayan

Chayan Sarkar wrote:

Hi,
I am new to llvm. I have project in llvm. For that I need SSA form,
which is already implemented in llvm. Basically I want to know which
pass insert phi and converts it to SSA form in llvm .

http://llvm.org/docs/Passes.html#mem2reg which is lib/Transforms/Utils/PromoteMemoryToRegister.cpp.

Nick

Thanks a lot.
Chayan