| Modifier and Type | Class and Description |
|---|---|
static interface |
PhiInsn.Visitor
Visitor interface for instances of this (outer) class.
|
| Constructor and Description |
|---|
PhiInsn(int resultReg,
SsaBasicBlock block)
Makes a phi insn with a void result type.
|
PhiInsn(RegisterSpec resultReg,
SsaBasicBlock block)
Constructs a new phi insn with no operands.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(SsaInsn.Visitor v)
Accepts a visitor.
|
void |
addPhiOperand(RegisterSpec registerSpec,
SsaBasicBlock predBlock)
Adds an operand to this phi instruction.
|
boolean |
areAllOperandsEqual() |
boolean |
canThrow()
Always returns false for
PhiInsns. |
void |
changeResultType(TypeBearer type,
LocalItem local)
Changes the result type.
|
PhiInsn |
clone() |
Rop |
getOpcode()
Returns the Rop opcode for this insn, or null if this is a phi insn.
|
Insn |
getOriginalRopInsn()
Returns the original Rop insn for this insn, or null if this is
a phi insn.
|
int |
getRopResultReg()
Gets the original rop-form result reg.
|
RegisterSpecList |
getSources()
Gets sources.
|
boolean |
hasSideEffect()
Returns true if this insn is considered to have a side effect beyond
that of assigning to the result reg.
|
boolean |
isPhiOrMove() |
boolean |
isRegASource(int reg)
Indicates whether the specified register is amongst the registers
used as sources for this instruction.
|
void |
mapSourceRegisters(RegisterMapper mapper)
Maps only source registers.
|
int |
predBlockIndexForSourcesIndex(int sourcesIndex)
Gets the index of the pred block associated with the RegisterSpec
at the particular getSources() index.
|
java.util.List<SsaBasicBlock> |
predBlocksForReg(int reg,
SsaMethod ssaMeth)
Returns the list of predecessor blocks associated with all operands
that have
reg as an operand register. |
void |
removePhiRegister(RegisterSpec registerSpec)
Removes all operand uses of a register from this phi instruction.
|
java.lang.String |
toHuman()
Return the "human" string form of this instance.
|
protected java.lang.String |
toHumanWithInline(java.lang.String extra)
Returns human-readable string for listing dumps.
|
Insn |
toRopInsn()
Always throws an exeption, since a phi insn may not be
converted back to rop form.
|
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.
|
changeResultReg, getBlock, getLocalAssignment, getResult, isMoveException, isNormalMoveInsn, isResultReg, makeFromRop, mapRegisters, setResult, setResultLocalpublic PhiInsn(RegisterSpec resultReg, SsaBasicBlock block)
resultReg - the result reg for this phi insnblock - block containing this insn.public PhiInsn(int resultReg,
SsaBasicBlock block)
resultReg - the result register for this phi insn.block - block containing this insn.public void updateSourcesToDefinitions(SsaMethod ssaMeth)
Note that local association of operands are preserved in this step.
ssaMeth - method that contains this insnpublic void changeResultType(TypeBearer type, LocalItem local)
type - non-null; new TypeBearerlocal - null-ok; new local info, if availablepublic int getRopResultReg()
public void addPhiOperand(RegisterSpec registerSpec, SsaBasicBlock predBlock)
registerSpec - register spec, including type and reg of operandpredBlock - predecessor block to be associated with this operandpublic void removePhiRegister(RegisterSpec registerSpec)
registerSpec - register spec, including type and reg of operandpublic int predBlockIndexForSourcesIndex(int sourcesIndex)
sourcesIndex - index of source in getSources()public Rop getOpcode()
PhiInsns.public Insn getOriginalRopInsn()
PhiInsns.getOriginalRopInsn in class SsaInsnnull-ok; Rop insn if there is one.public boolean canThrow()
PhiInsns.public RegisterSpecList getSources()
getSources in class SsaInsnnon-null; sources listpublic boolean isRegASource(int reg)
isRegASource in class SsaInsnreg - the register in questionpublic boolean areAllOperandsEqual()
public final void mapSourceRegisters(RegisterMapper mapper)
mapSourceRegisters in class SsaInsnmapper - new mappingpublic Insn toRopInsn()
public java.util.List<SsaBasicBlock> predBlocksForReg(int reg, SsaMethod ssaMeth)
reg as an operand register.reg - register to look upssaMeth - method we're operating onpublic boolean isPhiOrMove()
isPhiOrMove in class SsaInsnpublic boolean hasSideEffect()
hasSideEffect in class SsaInsnpublic void accept(SsaInsn.Visitor v)
public java.lang.String toHuman()
toString().non-null; the human string formprotected final java.lang.String toHumanWithInline(java.lang.String extra)
extra - null-ok; the argument to print after the opcodeCopyright © 2020. All Rights Reserved.