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
FieldsModifier and TypeFieldDescriptionprotected int[]protected final SSACFGprotected final SSAOptions.DefaultValuesprotected final DominanceFrontiers<ISSABasicBlock> protected final SSAInstruction[]protected final int[]protected IntStack[]protected final SymbolTableprotected int[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfail(int v) protected abstract intgetDef(SSAInstruction inst, int index) protected intgetDefaultValue(int valueNumber) protected SSAInstruction[]getInstructions(IR ir) protected abstract intprotected abstract intprotected abstract intprotected abstract intprotected abstract SSAPhiInstructiongetPhi(SSACFG.BasicBlock B, int index) protected abstract intgetUse(SSAInstruction inst, int index) protected booleanhasDefaultValue(int valueNumber) protected voidinit()protected abstract voidprotected abstract booleanprotected abstract booleanisConstant(int valueNumber) protected abstract booleanisLive(SSACFG.BasicBlock Y, int V) protected final Iterator<SSAInstruction> protected voidperform()protected abstract voidplaceNewPhiAt(int value, SSACFG.BasicBlock Y) protected voidprotected abstract voidpopAssignment(SSAInstruction inst, int index) protected abstract voidpushAssignment(SSAInstruction inst, int index, int newRhs) protected abstract voidprotected abstract voidrepairInstructionDefs(SSAInstruction inst, int index, int[] newDefs, int[] newUses) protected abstract voidrepairInstructionUses(SSAInstruction inst, int index, int[] newUses) protected abstract SSAPhiInstructionrepairPhiDefs(SSAPhiInstruction phi, int[] newDefs) protected abstract voidrepairPhiUse(SSACFG.BasicBlock BB, int phiIndex, int rvalIndex, int newRval) protected abstract voidsetPhi(SSACFG.BasicBlock B, int index, SSAPhiInstruction inst) protected abstract booleanskip(int vn) protected booleanskipRepair(SSAInstruction inst, int index) protected inttop(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)
-