Re: Newbie SSA question

Bob Morgan <crmorgan@venus.star.net>
1 Feb 2001 17:38:30 -0500

          From comp.compilers

Related articles
Newbie SSA question Kevin.Tucker@Microchip.com (2001-01-26)
Re: Newbie SSA question crmorgan@venus.star.net (Bob Morgan) (2001-02-01)
Re: Newbie SSA question apiron@ulb.ac.be (Anthony PIRON) (2001-02-01)
Re: Newbie SSA question Martin.Ward@durham.ac.uk (2001-02-01)
Re: Newbie SSA question pmk@visi.com (2001-02-12)
| List of all articles for this month |
From: Bob Morgan <crmorgan@venus.star.net>
Newsgroups: comp.compilers
Date: 1 Feb 2001 17:38:30 -0500
Organization: Posted via Supernews, http://www.supernews.com
References: 01-01-147
Keywords: analysis
Posted-Date: 01 Feb 2001 17:38:30 EST

On 26 Jan 2001 16:56:17 -0500, Kevin.Tucker@Microchip.com wrote:


>We're looking at implementing SSA in our compiler, and had a seemingly
>silly question, but I can't find a definitive answer in the papers
>that I've been reading (Cytron, et.al). The question is, when
>converting to SSA form, are you actually allocating new variables for
>each assignment, or are you just "renaming" them for notational
>purposes?. If the latter, then converting out of SSA form would mean
>simply "dropping the subscripts", as it were. We've had arguments
>both ways, and it looks like the answer is that you are supposed to
>allocate new variables for each new assignment, but an argument could
>be made for the other point of view, and I wanted to see what other
>had to say on the matter.


The answer depends on how you are going to use SSA. If you are using
SSA to analyze programs without performing transformations then the
renaming can be viewed as notational. If you are performing some
limited form of optimizations such as common subexpression elimination
then it still can be viewed as notational since there is no place that
two different renames of the same register are live. However, other
transformations, such as eliminating copy operations, can cause two
variants of the same register to be live at the same time. In that
case the easy thing to do is to actually rename the registers as new
registers.


Bob Morgan


Post a followup to this message

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