public abstract class SsaInsn extends java.lang.Object implements ToHuman, java.lang.Cloneable
| Modifier and Type | Class and Description |
|---|---|
static interface |
SsaInsn.Visitor
Visitor interface for this class.
|
| Modifier | Constructor and Description |
|---|---|
protected |
SsaInsn(RegisterSpec result,
SsaBasicBlock block)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
accept(SsaInsn.Visitor v)
Accepts a visitor.
|
abstract boolean |
canThrow() |
void |
changeResultReg(int reg)
Changes the result register if this insn has a result.
|
SsaInsn |
clone() |
SsaBasicBlock |
getBlock()
Gets the block to which this insn instance belongs.
|
RegisterSpec |
getLocalAssignment()
Gets the spec of a local variable assignment that occurs at this
instruction, or null if no local variable assignment occurs.
|
abstract Rop |
getOpcode()
Returns the Rop opcode for this insn, or null if this is a phi insn.
|
abstract Insn |
getOriginalRopInsn()
Returns the original Rop insn for this insn, or null if this is
a phi insn.
|
RegisterSpec |
getResult()
Like
getResult(). |
abstract RegisterSpecList |
getSources()
Like
getSources(). |
abstract boolean |
hasSideEffect()
Returns true if this insn is considered to have a side effect beyond
that of assigning to the result reg.
|
boolean |
isMoveException() |
boolean |
isNormalMoveInsn() |
abstract boolean |
isPhiOrMove() |
boolean |
isRegASource(int reg)
Indicates whether the specified register is amongst the registers
used as sources for this instruction.
|
boolean |
isResultReg(int reg)
Returns whether or not the specified reg is the result reg.
|
static SsaInsn |
makeFromRop(Insn insn,
SsaBasicBlock block)
Makes a new SSA insn form a rop insn.
|
void |
mapRegisters(RegisterMapper mapper)
Map registers after register allocation.
|
abstract void |
mapSourceRegisters(RegisterMapper mapper)
Maps only source registers.
|
protected void |
setResult(RegisterSpec result)
Set the result register.
|
void |
setResultLocal(LocalItem local)
Sets the local association for the result of this insn.
|
abstract Insn |
toRopInsn()
Transform back to ROP form.
|
protected SsaInsn(RegisterSpec result, SsaBasicBlock block)
result - null-ok; initial result register. May be changed.block - non-null; block containing this insn. Can
never change.public static SsaInsn makeFromRop(Insn insn, SsaBasicBlock block)
insn - non-null; rop insnblock - non-null; owning blocknon-null; an appropriately constructed instancepublic SsaInsn clone()
clone in class java.lang.Objectpublic RegisterSpec getResult()
getResult().protected void setResult(RegisterSpec result)
result - non-null; the new result registerpublic abstract RegisterSpecList getSources()
getSources().non-null; sources listpublic SsaBasicBlock getBlock()
public boolean isResultReg(int reg)
reg - register to testpublic void changeResultReg(int reg)
reg - new result registerpublic final void setResultLocal(LocalItem local)
local - null-ok; new debug/local variable infopublic final void mapRegisters(RegisterMapper mapper)
mapper - non-null; mapping from old to new registerspublic abstract void mapSourceRegisters(RegisterMapper mapper)
mapper - new mappingpublic abstract Rop getOpcode()
null-ok; Rop opcode if there is one.public abstract Insn getOriginalRopInsn()
null-ok; Rop insn if there is one.public RegisterSpec getLocalAssignment()
mark-local insns
it may be the source.null-ok; a local-associated register spec or nullInsn.getLocalAssignment()public boolean isRegASource(int reg)
reg - the register in questionpublic abstract Insn toRopInsn()
non-null; a ROP representation of this instruction, with
updated registers.public abstract boolean isPhiOrMove()
public abstract boolean hasSideEffect()
public boolean isNormalMoveInsn()
public boolean isMoveException()
public abstract boolean canThrow()
public abstract void accept(SsaInsn.Visitor v)
v - non-null the visitorCopyright © 2020. All Rights Reserved.