Re: SSA-form and cmove

"Stephen Clarke" <stephen.clarke@earthling.net>
20 Aug 2000 23:58:32 -0400

          From comp.compilers

Related articles
SSA-form and cmove tommy.hoffner@softlab.ericsson.se (Tommy Hoffner) (2000-08-13)
Re: SSA-form and cmove stephen.clarke@earthling.net (Stephen Clarke) (2000-08-20)
Re: SSA-form and cmove tlh20@cam.ac.uk (Tim Harris) (2000-08-27)
Re: SSA-form and cmove krish@wam.umd.edu (2000-09-02)
Re: SSA-form and cmove hannah@mamba.pond.sub.org (2000-09-13)
| List of all articles for this month |

From: "Stephen Clarke" <stephen.clarke@earthling.net>
Newsgroups: comp.compilers
Date: 20 Aug 2000 23:58:32 -0400
Organization: BT Internet
References: 00-08-066
Keywords: analysis

"Tommy Hoffner" <tommy.hoffner@softlab.ericsson.se> wrote in message


> The first apporoach will as I understand it work, but it will have to be
> expanded to a move and a cmove after register allocation with little or
> no hope of eliminating unnessecary introduced move instructions
> afterwards as well as risking the allocation of an extra register


This problem is very similar to having to cope with two-address target
instructions (where one of the operands is overwritten with the
result) - you want to assign the oldval and newval to the same
register if possible, in order to make the copy unnecessary. For
two-address instructions, there is a straightforward technique to
handle this during register coalescing that yields good results.
(Basically, as well as attempting to coalesce the source and dest of
copy instructions, you would also attempt to coalesce the oldval and
newval operands of cmove instructions. In the cases where the
coalescing was successful, the separate move instruction would not be
necessary.)


> Is there any other RISC instructions that is inherently none SSA?
> ( cmove cond, newval, result is per definition a possible second
> assignment to result, right?)


Conditional move is a special case of predicated instruction. For
ISAs that have general predication (i.e. conditional execution of any
instruction), the problem must exist on every instruction. Are there
compilers that use SSA and support general predication in the same
representation? What do the IA-64 compilers do?


Steve.







Post a followup to this message

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