Re: SSA-form and cmove

"Stephen Clarke" <>
20 Aug 2000 23:58:32 -0400

          From comp.compilers

Related articles
SSA-form and cmove (Tommy Hoffner) (2000-08-13)
Re: SSA-form and cmove (Stephen Clarke) (2000-08-20)
Re: SSA-form and cmove (Tim Harris) (2000-08-27)
Re: SSA-form and cmove (2000-09-02)
Re: SSA-form and cmove (2000-09-13)
| List of all articles for this month |

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

"Tommy Hoffner" <> 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

> 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?


Post a followup to this message

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