| Modifier and Type | Class and Description |
|---|---|
| private static class | PhiInsn.
A single phi operand, consiting of source register and block index for move. |
| public static interface | PhiInsn.
Visitor interface for instances of this (outer) class. |
| Modifier and Type | Field and Description |
|---|---|
| private final ArrayList | operands
|
| private final int | ropResultReg
result register. |
| private RegisterSpecList | sources
|
| Access | Constructor and Description |
|---|---|
| public | PhiInsn(RegisterSpec
the result reg for this phi insn resultReg, SsaBasicBlock block containing this insn. block)Constructs a new phi insn with no operands. |
| public | PhiInsn(final int
the result register for this phi insn. resultReg, final SsaBasicBlock block containing this insn. block)Makes a phi insn with a void result type. |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(SsaInsn.
non-null the visitorImplements abstract org. |
| public void | addPhiOperand(RegisterSpec
register spec, including type and reg of operand registerSpec, SsaBasicBlock predecessor block to be associated with this operand predBlock)Adds an operand to this phi instruction. |
| public boolean | |
| public boolean | canThrow()
Implements abstract org. PhiInsns.
|
| public void | changeResultType(TypeBearer
non-null; new TypeBearernull-ok; new local info, if availableChanges the result type. |
| public PhiInsn | clone()
Overrides org. |
| public Rop | getOpcode()
Implements abstract org. |
| public Insn | getOriginalRopInsn()
Implements abstract org. |
| public int | Returns: the original rop-form result regGets the original rop-form result reg. This is useful during renaming. |
| public RegisterSpecList | Returns: non-null; sources listImplements abstract org. |
| public boolean | hasSideEffect()
Implements abstract org. |
| public boolean | |
| public boolean | isRegASource(int
the register in question reg)Overrides org. |
| public final void | mapSourceRegisters(RegisterMapper
new mapping mapper)Implements abstract org. |
| public int | Returns: block indexindex of source in getSources() sourcesIndex)Gets the index of the pred block associated with the RegisterSpec at the particular getSources() index. |
| public List | Returns: list of predecessor blocks, empty if noneregister to look up reg, SsaMethod method we're operating on ssaMeth)Returns the list of predecessor blocks associated with all operands
that have |
| public void | removePhiRegister(RegisterSpec
register spec, including type and reg of operand registerSpec)Removes all operand uses of a register from this phi instruction. |
| public String | toHuman()
Implements org. |
| protected final String | Returns: human-readable string for listing dumpsnull-ok; the argument to print after the opcodeReturns human-readable string for listing dumps. |
| public Insn | Returns: always throws exceptionImplements abstract org. |
| public void | updateSourcesToDefinitions(SsaMethod
method that contains this insn ssaMeth)Updates the TypeBearers of all the sources (phi operands) to be the current TypeBearer of the register-defining instruction's result. |
| operands | back to summary |
|---|---|
| private final ArrayList<PhiInsn.
| |
| ropResultReg | back to summary |
|---|---|
| private final int ropResultReg result register. The original result register of the phi insn is needed during the renaming process after the new result register has already been chosen. | |
| sources | back to summary |
|---|---|
| private RegisterSpecList sources
| |
| PhiInsn | back to summary |
|---|---|
| public PhiInsn(RegisterSpec resultReg, SsaBasicBlock block) Constructs a new phi insn with no operands.
| |
| PhiInsn | back to summary |
|---|---|
| public PhiInsn(final int resultReg, final SsaBasicBlock block) Makes a phi insn with a void result type.
| |
| accept | back to summary |
|---|---|
| public void accept(SsaInsn. Implements abstract org. Doc from org. Accepts a visitor. | |
| addPhiOperand | back to summary |
|---|---|
| public void addPhiOperand(RegisterSpec registerSpec, SsaBasicBlock predBlock) Adds an operand to this phi instruction.
| |
| areAllOperandsEqual | back to summary |
|---|---|
public boolean areAllOperandsEqual()
| |
| canThrow | back to summary |
|---|---|
| public boolean canThrow() Implements abstract org.
Always returns false for
| |
| changeResultType | back to summary |
|---|---|
| public void changeResultType(TypeBearer type, LocalItem local) Changes the result type. Used during phi type resolution
| |
| clone | back to summary |
|---|---|
| public PhiInsn clone() Overrides org. Doc from org. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| getOpcode | back to summary |
|---|---|
| public Rop getOpcode() Implements abstract org. Doc from org. Returns the Rop opcode for this insn, or null if this is a phi insn. Todo Move this up into NormalSsaInsn. PhiInsns.
| |
| getOriginalRopInsn | back to summary |
|---|---|
| public Insn getOriginalRopInsn() Implements abstract org. Doc from org. Returns the original Rop insn for this insn, or null if this is a phi insn. Todo Move this up into NormalSsaInsn. PhiInsns.
| |
| getRopResultReg | back to summary |
|---|---|
| public int getRopResultReg() Gets the original rop-form result reg. This is useful during renaming.
| |
| getSources | back to summary |
|---|---|
| public RegisterSpecList getSources() Implements abstract org. Gets sources. Constructed lazily from phi operand data structures and then cached.
| |
| hasSideEffect | back to summary |
|---|---|
| public boolean hasSideEffect() Implements abstract org. Doc from org. Returns true if this insn is considered to have a side effect beyond that of assigning to the result reg.
| |
| isPhiOrMove | back to summary |
|---|---|
| public boolean isPhiOrMove() Implements abstract org.
| |
| isRegASource | back to summary |
|---|---|
| public boolean isRegASource(int reg) Overrides org. Doc from org. Indicates whether the specified register is amongst the registers used as sources for this instruction.
| |
| mapSourceRegisters | back to summary |
|---|---|
| public final void mapSourceRegisters(RegisterMapper mapper) Implements abstract org. Doc from org. Maps only source registers.
| |
| predBlockIndexForSourcesIndex | back to summary |
|---|---|
| public int predBlockIndexForSourcesIndex(int sourcesIndex) Gets the index of the pred block associated with the RegisterSpec at the particular getSources() index.
| |
| predBlocksForReg | back to summary |
|---|---|
| public List Returns the list of predecessor blocks associated with all operands
that have
| |
| removePhiRegister | back to summary |
|---|---|
| public void removePhiRegister(RegisterSpec registerSpec) Removes all operand uses of a register from this phi instruction.
| |
| toHuman | back to summary |
|---|---|
| public String toHuman() Implements org. Doc from org. Return the "human" string form of this instance. This is
generally less "debuggy" than
| |
| toHumanWithInline | back to summary |
|---|---|
| protected final String toHumanWithInline(String extra) Returns human-readable string for listing dumps. This method allows sub-classes to specify extra text. | |
| toRopInsn | back to summary |
|---|---|
| public Insn toRopInsn() Implements abstract org. Always throws an exeption, since a phi insn may not be converted back to rop form. | |
| updateSourcesToDefinitions | back to summary |
|---|---|
| public void updateSourcesToDefinitions(SsaMethod ssaMeth) Updates the TypeBearers of all the sources (phi operands) to be the current TypeBearer of the register-defining instruction's result. This is used during phi-type resolution. Note that local association of operands are preserved in this step.
| |
| Modifier and Type | Field and Description |
|---|---|
| public final int | |
| public RegisterSpec | |
| public final int |
| Access | Constructor and Description |
|---|---|
| public |
| blockIndex | back to summary |
|---|---|
| public final int blockIndex | |
| regSpec | back to summary |
|---|---|
| public RegisterSpec regSpec | |
| ropLabel | back to summary |
|---|---|
| public final int ropLabel | |
| Operand | back to summary |
|---|---|
| public Operand(RegisterSpec regSpec, int blockIndex, int ropLabel) | |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| visitPhiInsn | back to summary |
|---|---|
| public void visitPhiInsn(PhiInsn insn) | |