Class AbstractSSAConversion
java.lang.Object
com.ibm.wala.cast.ir.ssa.AbstractSSAConversion
- Direct Known Subclasses:
SSAConversion
Abstract core of traditional SSA conversion (Cytron et al.).
This implementation is abstract in the sense that it is designed to work over the instructions and CFG of a Domo IR, but it is abstract with respect to several integral portions of the traditional algorithm:
- The notion of uses and defs of a given instruction.
- Assignments (<def> := <use>) that are be copy-propagated away
- Which values are constants---i.e. have no definition.
- Any value numbers to be skipped during SSA construction
- Special initialization and exit block processing.
- Author:
- Julian dolby (dolby@us.ibm.com)
-
Field Summary
Modifier and TypeFieldDescriptionprotected int[]
protected final SSACFG
protected final SSAOptions.DefaultValues
protected final DominanceFrontiers
<ISSABasicBlock> protected final SSAInstruction[]
protected final int[]
protected IntStack[]
protected final SymbolTable
protected int[]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
fail
(int v) protected abstract int
getDef
(SSAInstruction inst, int index) protected int
getDefaultValue
(int valueNumber) protected SSAInstruction[]
getInstructions
(IR ir) protected abstract int
protected abstract int
protected abstract int
protected abstract int
protected abstract SSAPhiInstruction
getPhi
(SSACFG.BasicBlock B, int index) protected abstract int
getUse
(SSAInstruction inst, int index) protected boolean
hasDefaultValue
(int valueNumber) protected void
init()
protected abstract void
protected abstract boolean
protected abstract boolean
isConstant
(int valueNumber) protected abstract boolean
isLive
(SSACFG.BasicBlock Y, int V) protected final Iterator
<SSAInstruction> protected void
perform()
protected abstract void
placeNewPhiAt
(int value, SSACFG.BasicBlock Y) protected void
protected abstract void
popAssignment
(SSAInstruction inst, int index) protected abstract void
pushAssignment
(SSAInstruction inst, int index, int newRhs) protected abstract void
protected abstract void
repairInstructionDefs
(SSAInstruction inst, int index, int[] newDefs, int[] newUses) protected abstract void
repairInstructionUses
(SSAInstruction inst, int index, int[] newUses) protected abstract SSAPhiInstruction
repairPhiDefs
(SSAPhiInstruction phi, int[] newDefs) protected abstract void
repairPhiUse
(SSACFG.BasicBlock BB, int phiIndex, int rvalIndex, int newRval) protected abstract void
setPhi
(SSACFG.BasicBlock B, int index, SSAPhiInstruction inst) protected abstract boolean
skip
(int vn) protected boolean
skipRepair
(SSAInstruction inst, int index) protected int
top
(int v)
-
Field Details
-
CFG
-
DF
-
phiCounts
protected final int[] phiCounts -
instructions
-
symbolTable
-
defaultValues
-
S
-
C
protected int[] C -
valueMap
protected int[] valueMap
-
-
Constructor Details
-
AbstractSSAConversion
-
-
Method Details
-
getNumberOfDefs
-
getDef
-
getNumberOfUses
-
getUse
-
isAssignInstruction
-
getMaxValueNumber
protected abstract int getMaxValueNumber() -
isLive
-
skip
protected abstract boolean skip(int vn) -
isConstant
protected abstract boolean isConstant(int valueNumber) -
getNextNewValueNumber
protected abstract int getNextNewValueNumber() -
initializeVariables
protected abstract void initializeVariables() -
repairExit
protected abstract void repairExit() -
placeNewPhiAt
-
getPhi
-
setPhi
-
repairPhiDefs
-
repairPhiUse
protected abstract void repairPhiUse(SSACFG.BasicBlock BB, int phiIndex, int rvalIndex, int newRval) -
repairInstructionUses
-
repairInstructionDefs
protected abstract void repairInstructionDefs(SSAInstruction inst, int index, int[] newDefs, int[] newUses) -
pushAssignment
-
popAssignment
-
perform
protected void perform() -
getInstructions
-
iterateInstructions
-
init
protected void init() -
placePhiNodes
protected void placePhiNodes() -
skipRepair
-
fail
protected void fail(int v) -
hasDefaultValue
protected boolean hasDefaultValue(int valueNumber) -
getDefaultValue
protected int getDefaultValue(int valueNumber) -
top
protected int top(int v)
-