|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.backend.trips2.SSA
public class SSA
This class converts a PFG into the SSA form of the PFG.
$Id: SSA.java,v 1.56 2007-10-04 19:57:59 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
The algorithm comes from Practical Improvements to the Construction and Destruction of Static Single Assignment Form by Briggs, et al, in Software - Practice and Experience, Vol 1(1), 1-28, January 1988.
To enter SSA form, read/write instructions must already be inserted for all global registers which are live-in/out of the hyperblock.
Constructor Summary | |
---|---|
SSA(RegisterSet registers,
Hyperblock hb)
The SSA constructor. |
Method Summary | |
---|---|
protected void |
addUse(Instruction inst,
int use)
Record that an instruction uses a register. |
void |
clearDefUse(Instruction inst)
Remove all the use-def and def-use information for an instruction. |
static int |
copiesFolded()
Return the number of instructions removed. |
static int |
deadInstructions()
Return the number of instructions removed. |
IntMap<Vector<Instruction>> |
getDefUse()
Get a map of uses to Instructions. |
IntMap<Instruction> |
getUseDef()
Get a map of definitions to Instructions. |
static int |
phisInserted()
Return the number of phi instructions inserted. |
void |
placePhis()
Place phi functions and rename all variables. |
void |
removeDeadCode()
Remove instructions which are dead. |
void |
removePhis()
Remove any phi instructions still in the PFG. |
void |
removeUse(Instruction inst,
int use)
Remove an instruction from the set of uses. |
void |
setDef(Instruction inst,
int def)
Set the instruction which defines a register. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SSA(RegisterSet registers, Hyperblock hb)
Method Detail |
---|
public static int deadInstructions()
public static int copiesFolded()
public static int phisInserted()
public final void placePhis()
public final IntMap<Instruction> getUseDef()
public final IntMap<Vector<Instruction>> getDefUse()
public final void setDef(Instruction inst, int def)
public final void removeUse(Instruction inst, int use)
protected void addUse(Instruction inst, int use)
public final void clearDefUse(Instruction inst)
public final void removePhis()
public final void removeDeadCode()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |