public final class SSAUtil extends Object
PHI
sPHI
LIRInstruction. Instead, they are implemented
as parallel copy that span across a control-flow edge.
The variables introduced by PHI
s of a specific merge
block are attached to the StandardOp.LabelOp of the
block. The outgoing values from the predecessor are input
to the
StandardOp.BlockEndOp of the predecessor. Because there are no critical edges we know that the
StandardOp.BlockEndOp
of the predecessor has to be a StandardOp.JumpOp
.
B0 -> B1 ... v0|i = ... JUMP ~[v0|i, int[0|0x0]] destination: B0 -> B1 ________________________________________________ B2 -> B1 ... v1|i = ... v2|i = ... JUMP ~[v1|i, v2|i] destination: B2 -> B1 ________________________________________________ B1 <- B0,B2 [v3|i, v4|i] = LABEL ...
Modifier and Type | Class and Description |
---|---|
static interface |
SSAUtil.PhiValueVisitor |
Constructor and Description |
---|
SSAUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
forEachPhiRegisterHint(LIR lir,
AbstractBlockBase<?> block,
StandardOp.LabelOp label,
Value targetValue,
LIRInstruction.OperandMode mode,
ValueConsumer valueConsumer) |
static void |
forEachPhiValuePair(LIR lir,
AbstractBlockBase<?> merge,
AbstractBlockBase<?> pred,
SSAUtil.PhiValueVisitor visitor)
Visits each phi value pair of an edge, i.e.
|
private static int |
indexOfValue(StandardOp.LabelOp label,
Value value) |
private static StandardOp.LabelOp |
phiIn(LIR lir,
AbstractBlockBase<?> block) |
private static StandardOp.JumpOp |
phiOut(LIR lir,
AbstractBlockBase<?> block) |
static int |
phiOutIndex(LIR lir,
AbstractBlockBase<?> block) |
static void |
removePhiIn(LIR lir,
AbstractBlockBase<?> block) |
static void |
removePhiOut(LIR lir,
AbstractBlockBase<?> block) |
static void |
verifyPhi(LIR lir,
AbstractBlockBase<?> merge) |
static boolean |
verifySSAForm(LIR lir) |
public SSAUtil()
public static void forEachPhiValuePair(LIR lir, AbstractBlockBase<?> merge, AbstractBlockBase<?> pred, SSAUtil.PhiValueVisitor visitor)
private static StandardOp.JumpOp phiOut(LIR lir, AbstractBlockBase<?> block)
public static int phiOutIndex(LIR lir, AbstractBlockBase<?> block)
private static StandardOp.LabelOp phiIn(LIR lir, AbstractBlockBase<?> block)
public static void removePhiOut(LIR lir, AbstractBlockBase<?> block)
public static void removePhiIn(LIR lir, AbstractBlockBase<?> block)
public static boolean verifySSAForm(LIR lir)
public static void verifyPhi(LIR lir, AbstractBlockBase<?> merge)
public static void forEachPhiRegisterHint(LIR lir, AbstractBlockBase<?> block, StandardOp.LabelOp label, Value targetValue, LIRInstruction.OperandMode mode, ValueConsumer valueConsumer)
private static int indexOfValue(StandardOp.LabelOp label, Value value)