public class ShrikeIndirectionData extends java.lang.Object implements SSAIndirectionData<ShrikeIndirectionData.ShrikeLocalName>
SSAIndirectionData specialized for IRs originated from Shrike.| Modifier and Type | Class and Description |
|---|---|
static class |
ShrikeIndirectionData.ShrikeLocalName
In Shrike, the only "source" level entities which have names relevant to indirect pointer
operations are bytecode locals.
|
SSAIndirectionData.Name| Constructor and Description |
|---|
ShrikeIndirectionData(int instructionArrayLength) |
| Modifier and Type | Method and Description |
|---|---|
int |
getDef(int instructionIndex,
ShrikeIndirectionData.ShrikeLocalName name)
For the instruction at the given index, and a source-level name, return the SSA value number
which represents this instruction's def of that name.
|
java.util.Collection<ShrikeIndirectionData.ShrikeLocalName> |
getNames()
Returns the set of "source" level names (e.g.
|
int |
getUse(int instructionIndex,
ShrikeIndirectionData.ShrikeLocalName name)
For the instruction at the given index, and a source-level name, return the SSA value number
which represents this instruction's use of that name.
|
void |
setDef(int instructionIndex,
ShrikeIndirectionData.ShrikeLocalName name,
int newDef)
Record the fact that a particular instruction defs a particular SSA value number (newDef),
representing the value of a "source" entity "name".
|
void |
setUse(int instructionIndex,
ShrikeIndirectionData.ShrikeLocalName name,
int newUse) |
java.lang.String |
toString() |
public int getDef(int instructionIndex,
ShrikeIndirectionData.ShrikeLocalName name)
SSAIndirectionDataFor example, in Example B in header comment above, suppose v2 referred to a "source"-entity called "Local1". Since instruction (1) (call to bar) defs "Local1", we introduce in this table a new SSA value number, say v7, which represents the value of "Local1" immediately after this instruction.
getDef in interface SSAIndirectionData<ShrikeIndirectionData.ShrikeLocalName>public int getUse(int instructionIndex,
ShrikeIndirectionData.ShrikeLocalName name)
SSAIndirectionDataFor example, in Example A in header comment above, suppose v1 referred to a "source"-entity called "Local1". Since instruction (1) (LoadIndirect) uses "Local1", we record in this table the SSA value number that represents "Local1" immediately before instruction (1). So if v1 and v7 both refer to "Local1", then (1) uses v7. If v7 does NOT refer to "Local1", then (1) uses v1.
getUse in interface SSAIndirectionData<ShrikeIndirectionData.ShrikeLocalName>public void setDef(int instructionIndex,
ShrikeIndirectionData.ShrikeLocalName name,
int newDef)
SSAIndirectionDatasetDef in interface SSAIndirectionData<ShrikeIndirectionData.ShrikeLocalName>SSAIndirectionData.getDef(int, T)public void setUse(int instructionIndex,
ShrikeIndirectionData.ShrikeLocalName name,
int newUse)
setUse in interface SSAIndirectionData<ShrikeIndirectionData.ShrikeLocalName>SSAIndirectionData.getUse(int, T)public java.util.Collection<ShrikeIndirectionData.ShrikeLocalName> getNames()
SSAIndirectionDatagetNames in interface SSAIndirectionData<ShrikeIndirectionData.ShrikeLocalName>public java.lang.String toString()
toString in class java.lang.Object