On Thu, Dec 4, 2008 at 11:20, John Freeman <[EMAIL PROTECTED]> wrote:
> There are documented methods of SSA decomposition.  The naive method is a
> simple reversal of SSA composition:
>
> SSA composition: rename variables (typically by adding suffix), add phi
> nodes
> SSA decomposition: rename variables (by dropping suffix), remove phi nodes
>
> The short answer to your question is that there is no C equivalent of a phi
> node.  You simply drop it.

That's only true if the program was not rewritten into SSA form or no
overlapping live ranges in SSA names exist.

If the program was rewritten into SSA and different SSA names for the
same symbol have overlapping live ranges (due to code motion and copy
propagation mostly), then dropping the PHIs gives you an invalid
program.  You have to convert the PHIs into copies.

If the SSA form you use is simply a factored use-def representation,
then dropping the PHIs is fine, of course.  GCC uses both forms: local
scalars are rewritten into SSA.  Memory symbols (arrays, aggregates,
aliased symbols) are represented with a FUD web.


Diego.

Reply via email to