bytecode -> ssa -> bytecode

Jason Selby <>
23 Jul 2000 17:04:47 -0400

          From comp.compilers

Related articles
bytecode -> ssa -> bytecode (Jason Selby) (2000-07-23)
Re: bytecode -> ssa -> bytecode (Jim White) (2000-07-27)
| List of all articles for this month |

From: Jason Selby <>
Date: 23 Jul 2000 17:04:47 -0400
Organization: The University of Western Ontario, London, Ont. Canada
Keywords: Java, tools, optimize

I am implementing a Java bytecode to bytecode optimizer in which I
translate the bytecode into three-address code that is in SSA form,
perform some optimizations and then restore the bytecode.

The problem that I am having is in the destruction of phi-nodes, my
implementation works for primitive types but when it comes to objects
I do not have an idea of how to get around the "lost-copy" and "swap"
problems for objects.

Is there a general solution for these problems for objects? For
instance, to deal with the swap problem I have to make a deep copy of
the object but what if the class does not implement cloneable (I am
trying to keep the amount of changes made to the definition of a class
to a minimum)?

My only thought is to ensure the class implements Cloneable and insert
calls to the clone method to create the temps. Is this the only

Jason Selby

Post a followup to this message

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