[cfe-dev] LLVM emission without PHIs (out-of-SSA)

John McCall rjmccall at apple.com
Sun Apr 10 21:54:14 PDT 2011


On Apr 10, 2011, at 6:35 PM, nkavv at physics.auth.gr wrote:
> is it possible in clang (2.8 or 2.9 release) to generate llvm assembly  
> (via -emit-llvm) without the use of phi statements? Is there any  
> option either in clang or llvm core to generate llvm assembly  
> following an out-of-SSA conversion?

LLVM has a reg2mem "optimization" pass, so something like this should work:
  clang -c -emit-llvm -o - | opt -reg2mem -o blah.bc

John.



More information about the cfe-dev mailing list