Modifier and Type | Field and Description |
---|---|
protected ArrayList<SSAInstruction> |
allInstructions
A Mapping from integer -> Instruction
|
Modifier and Type | Method and Description |
---|---|
SSAInstruction |
getDef(int v) |
protected int |
getDef(SSAInstruction s,
int i)
What is the ith value number defined by instruction s?
|
protected int |
getMaxValueNumber() |
protected int |
getNumberOfDefs(SSAInstruction s)
How many value numbers does instruction s def?
|
int |
getNumberOfUses(int v) |
protected int |
getNumberOfUses(SSAInstruction s)
How many value numbers does instruction s use?
|
protected int |
getUse(SSAInstruction s,
int i)
What is the ith value number used by instruction s?
|
Iterator<SSAInstruction> |
getUses(int v)
Return all uses of the variable with the given value number
|
protected void |
initAllInstructions()
Initialize the allInstructions field with every
SSAInstruction in the ir. |
protected final ArrayList<SSAInstruction> allInstructions
public DefUse(IR ir)
ir
- an IR in SSA form.IllegalArgumentException
- if ir is nullprotected int getMaxValueNumber()
protected void initAllInstructions()
SSAInstruction
in the ir.protected int getDef(SSAInstruction s, int i)
protected int getUse(SSAInstruction s, int i)
protected int getNumberOfDefs(SSAInstruction s)
protected int getNumberOfUses(SSAInstruction s)
public SSAInstruction getDef(int v)
SSAInstruction
that defines the variable with value number v.public Iterator<SSAInstruction> getUses(int v)
public int getNumberOfUses(int v)
v
- a value number