LLVM emission without PHIs (out-of-SSA)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

LLVM emission without PHIs (out-of-SSA)

nkavv
Hi there

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?

Thanks in advance.

Nikolaos Kavvadias



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: LLVM emission without PHIs (out-of-SSA)

John McCall
On Apr 10, 2011, at 6:35 PM, [hidden email] 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.
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev