Re: SSA without phi

Matthias Blume <find@my.address.elsewhere>
26 Apr 2007 09:36:03 -0400

          From comp.compilers

Related articles
SSA without phi Nicolas.Capens@gmail.com (2007-04-20)
Re: SSA without phi tommy.thorn@gmail.com (Tommy Thorn) (2007-04-23)
Re: SSA without phi jle@forest.owlnet.rice.edu (2007-04-23)
SSA without phi inderaj@gmail.com (Inderaj Bains) (2007-04-23)
Re: SSA without phi cfc@shell01.TheWorld.com (Chris F Clark) (2007-04-23)
Re: SSA without phi find@my.address.elsewhere (Matthias Blume) (2007-04-26)
Re: SSA without phi Nicolas.Capens@gmail.com (2007-04-29)
Re: SSA without phi tommy.thorn@gmail.com (Tommy Thorn) (2007-05-04)
Re: SSA without phi jle@forest.owlnet.rice.edu (2007-05-04)
Re: SSA without phi inderaj@gmail.com (Inderaj Bains) (2007-05-07)
Re: SSA without phi tommy.thorn@gmail.com (Tommy Thorn) (2007-05-08)
Re: SSA without phi Nicolas.Capens@gmail.com (2007-05-22)
| List of all articles for this month |
From: Matthias Blume <find@my.address.elsewhere>
Newsgroups: comp.compilers
Date: 26 Apr 2007 09:36:03 -0400
Organization: private
References: 07-04-075 07-04-086
Keywords: analysis
Posted-Date: 26 Apr 2007 09:36:03 EDT

Tommy Thorn <tommy.thorn@gmail.com> 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


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.