public class SSAConversion extends AbstractSSAConversion
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
static boolean |
DEBUG_NAMES |
static boolean |
DEBUG_UNDO |
static boolean |
DUMP |
C, CFG, defaultValues, DF, instructions, phiCounts, S, symbolTable, valueMap
Modifier and Type | Method and Description |
---|---|
static IR.SSA2LocalMap |
convert(AstMethod M,
AstIRFactory.AstIR ir,
SSAOptions options) |
static IR.SSA2LocalMap |
convert(AstMethod M,
AstIRFactory.AstIR ir,
SSAOptions options,
IntSet values) |
static void |
copyUse(AstIRFactory.AstIR ir,
int fromInst,
int fromUse,
int toInst,
int toUse) |
protected void |
fail(int v) |
IR.SSA2LocalMap |
getComputedLocalMap() |
protected int |
getDef(SSAInstruction inst,
int index) |
protected int |
getMaxValueNumber() |
protected int |
getNextNewValueNumber() |
protected int |
getNumberOfDefs(SSAInstruction inst) |
protected int |
getNumberOfUses(SSAInstruction inst) |
protected SSAPhiInstruction |
getPhi(SSACFG.BasicBlock B,
int index) |
protected int |
getUse(SSAInstruction inst,
int index) |
protected void |
initializeVariables() |
protected boolean |
isAssignInstruction(SSAInstruction inst) |
protected boolean |
isConstant(int valueNumber) |
protected boolean |
isLive(SSACFG.BasicBlock Y,
int V) |
void |
perform() |
protected void |
placeNewPhiAt(int value,
SSACFG.BasicBlock Y) |
protected void |
popAssignment(SSAInstruction inst,
int index) |
protected void |
pushAssignment(SSAInstruction inst,
int index,
int newRhs) |
protected void |
repairExit() |
protected void |
repairInstructionDefs(SSAInstruction inst,
int index,
int[] newDefs,
int[] newUses) |
protected void |
repairInstructionUses(SSAInstruction inst,
int index,
int[] newUses) |
protected SSAPhiInstruction |
repairPhiDefs(SSAPhiInstruction phi,
int[] newDefs) |
protected void |
repairPhiUse(SSACFG.BasicBlock BB,
int phiIndex,
int rvalIndex,
int newRval) |
protected void |
setPhi(SSACFG.BasicBlock B,
int index,
SSAPhiInstruction inst) |
protected boolean |
skip(int vn) |
protected boolean |
skipRepair(SSAInstruction inst,
int index) |
static void |
undoCopyPropagation(AstIRFactory.AstIR ir,
int instruction,
int use) |
getDefaultValue, getInstructions, hasDefaultValue, init, iterateInstructions, placePhiNodes, top
public static boolean DEBUG
public static boolean DEBUG_UNDO
public static boolean DEBUG_NAMES
public static boolean DUMP
public static void undoCopyPropagation(AstIRFactory.AstIR ir, int instruction, int use)
public static void copyUse(AstIRFactory.AstIR ir, int fromInst, int fromUse, int toInst, int toUse)
protected int getNumberOfDefs(SSAInstruction inst)
getNumberOfDefs
in class AbstractSSAConversion
protected int getDef(SSAInstruction inst, int index)
getDef
in class AbstractSSAConversion
protected int getNumberOfUses(SSAInstruction inst)
getNumberOfUses
in class AbstractSSAConversion
protected int getUse(SSAInstruction inst, int index)
getUse
in class AbstractSSAConversion
protected boolean isAssignInstruction(SSAInstruction inst)
isAssignInstruction
in class AbstractSSAConversion
protected int getMaxValueNumber()
getMaxValueNumber
in class AbstractSSAConversion
protected boolean skip(int vn)
skip
in class AbstractSSAConversion
protected boolean isLive(SSACFG.BasicBlock Y, int V)
isLive
in class AbstractSSAConversion
protected void placeNewPhiAt(int value, SSACFG.BasicBlock Y)
placeNewPhiAt
in class AbstractSSAConversion
protected SSAPhiInstruction getPhi(SSACFG.BasicBlock B, int index)
getPhi
in class AbstractSSAConversion
protected void setPhi(SSACFG.BasicBlock B, int index, SSAPhiInstruction inst)
setPhi
in class AbstractSSAConversion
protected SSAPhiInstruction repairPhiDefs(SSAPhiInstruction phi, int[] newDefs)
repairPhiDefs
in class AbstractSSAConversion
protected void repairPhiUse(SSACFG.BasicBlock BB, int phiIndex, int rvalIndex, int newRval)
repairPhiUse
in class AbstractSSAConversion
protected void pushAssignment(SSAInstruction inst, int index, int newRhs)
pushAssignment
in class AbstractSSAConversion
protected void repairInstructionUses(SSAInstruction inst, int index, int[] newUses)
repairInstructionUses
in class AbstractSSAConversion
protected void repairInstructionDefs(SSAInstruction inst, int index, int[] newDefs, int[] newUses)
repairInstructionDefs
in class AbstractSSAConversion
protected void popAssignment(SSAInstruction inst, int index)
popAssignment
in class AbstractSSAConversion
protected boolean isConstant(int valueNumber)
isConstant
in class AbstractSSAConversion
protected boolean skipRepair(SSAInstruction inst, int index)
skipRepair
in class AbstractSSAConversion
protected int getNextNewValueNumber()
getNextNewValueNumber
in class AbstractSSAConversion
protected void initializeVariables()
initializeVariables
in class AbstractSSAConversion
protected void repairExit()
repairExit
in class AbstractSSAConversion
protected void fail(int v)
fail
in class AbstractSSAConversion
public IR.SSA2LocalMap getComputedLocalMap()
public void perform()
perform
in class AbstractSSAConversion
public static IR.SSA2LocalMap convert(AstMethod M, AstIRFactory.AstIR ir, SSAOptions options)
public static IR.SSA2LocalMap convert(AstMethod M, AstIRFactory.AstIR ir, SSAOptions options, IntSet values)