2008/12/3 James Courtier-Dutton <[EMAIL PROTECTED]>:

> Example C code:
> a = 1;
> if (condition) a = 2;
> b = a;
>
> In SSA  (use $ for the Phi, Φ)
> a1 = 1;
> if (condition) a2 = 2;
> a3 = $(a1, a2);
> b1 = a3;
>
> My problem is how do I convert the "a3 = $(a1, a2);" back to normal C code?

Try using -fdump-tree-ssa and -fdump-tree-optimized to show you both
the SSA and normal form for the program.  If you use mainline GCC you
can get the SSA form of the program even with optimizations turned
off.  For previous releases of GCC you'll need to enable optimizations
to get the SSA form.

The dump output is C-like, but not compilable in general (needs
declarations and some syntax is usually not valid C).


Diego.

Reply via email to