Re: SSA without phi
- From: Matthias Blume <find@xxxxxxxxxxxxxxxxxxxx>
- Date: 26 Apr 2007 09:36:03 -0400
Tommy Thorn <tommy.thorn@xxxxxxxxx> writes:
A common alternative representation of SSA distributes the arguments
into the predecessor blocks., ie instead of
B2:
v.2 = phi(v.0, v.1)
....
you'd have
B0:
...
jump B2(v.0)
B1:
...
jump B1(v.1)
B2(v.2):
...
This is strictly isomorphic to the traditional representation, but can
be easier to work with.
[...]
(*) This is also a bit of a philospohical opinion. I want my compiler
to behave in a way that a programmer would optimize code. SSA with phi
functions just isn't natural, while the idea of static assignment is
fundamental in functional programming and well understood.
What's "natural" is relative.
The alternative representation sketched above looks very much like
tail recursive function calls.
Indeed.
It might help if you'd look up some of the literature on the
correspondence between SSA and CPS. See, e.g., the papers by Kelsey
(1995) and Appel (1998), both in SIGPLAN Notices.
Matthias
.
- References:
- SSA without phi
- From: Nicolas . Capens
- Re: SSA without phi
- From: Tommy Thorn
- SSA without phi
- Prev by Date: Re: parsing ISO C++(1998/2003)
- Next by Date: Re: Java compiler courses
- Previous by thread: Re: SSA without phi
- Next by thread: Re: SSA without phi
- Index(es):