SSA-form and cmove

Tommy Hoffner <tommy.hoffner@softlab.ericsson.se>
13 Aug 2000 18:50:52 -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: Tommy Hoffner <tommy.hoffner@softlab.ericsson.se>
Newsgroups: comp.compilers
Date: 13 Aug 2000 18:50:52 -0400
Organization: Ericsson SoftLab AB
Keywords: analysis

We are currently developing a binary translator or a highly optimizing
CISC to RISC compiler. The largest part of optimization is done on a RISC
like intermediary language.
We have run into some problem in generating SSA form when introducing a
cmove (conditional move) instruction into the intermediary language.
Currently we are considering one of the following two approaches:
make the cmove a four operand instruction e.g.,
cmove cond, oldval, newval, result
thus forcing single assignment on the instruction


introduce a phi node immediately after the cmove instruction,
joining the original value with the possible new value (haven't
figured out the details yet, if it is possible at all :-)


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


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


Is it possible to solve it with the second approach? Or is there any
other way to handle this?


-- =


Tommy Hoffner Senior Consultant Ericsson SoftLab AB
E-mail: Tommy.hoffner@softlab.ericsson.se Phone: +46 13 23 57 12
Address:Datalinjen 1, 583 30 Link=F6ping, Sweden Web:www.softlab.se


Post a followup to this message

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