public class PhiResolver extends Object
r1 := r2 becomes temp := r1 r2 := r1 r1 := r2 r2 := tempand orders moves:
r2 := r3 becomes r1 := r2 r1 := r2 r2 := r3
Modifier and Type | Class and Description |
---|---|
(package private) static class |
PhiResolver.PhiResolverNode
Tracks a data flow dependency between a source operand and any number of the destination
operands.
|
Modifier and Type | Field and Description |
---|---|
private LIRInsertionBuffer |
buffer |
private LIRGeneratorTool |
gen |
private int |
insertBefore |
private PhiResolver.PhiResolverNode |
loop
The operand loop header phi for the operand currently being process in
dispose() . |
private LIRGeneratorTool.SpillMoveFactory |
moveFactory |
private HashMap<Value,PhiResolver.PhiResolverNode> |
operandToNodeMap
Maps operands to nodes.
|
private ArrayList<PhiResolver.PhiResolverNode> |
otherOperands |
private Value |
temp |
private ArrayList<PhiResolver.PhiResolverNode> |
variableOperands |
Modifier | Constructor and Description |
---|---|
protected |
PhiResolver(LIRGeneratorTool gen,
LIRInsertionBuffer buffer,
List<LIRInstruction> instructions,
int insertBefore) |
Modifier and Type | Method and Description |
---|---|
static PhiResolver |
create(LIRGeneratorTool gen) |
static PhiResolver |
create(LIRGeneratorTool gen,
LIRInsertionBuffer buffer,
List<LIRInstruction> instructions,
int insertBefore) |
private PhiResolver.PhiResolverNode |
createNode(Value operand,
boolean source) |
private PhiResolver.PhiResolverNode |
destinationNode(Value opr) |
void |
dispose() |
private void |
emitMove(Value dest,
Value src) |
private void |
move(PhiResolver.PhiResolverNode dest,
PhiResolver.PhiResolverNode src) |
void |
move(Value dest,
Value src) |
private void |
moveTempTo(Value dest) |
private void |
moveToTemp(Value src) |
private PhiResolver.PhiResolverNode |
sourceNode(Value opr) |
private final LIRGeneratorTool gen
private final LIRGeneratorTool.SpillMoveFactory moveFactory
private final LIRInsertionBuffer buffer
private final int insertBefore
private PhiResolver.PhiResolverNode loop
dispose()
.private final ArrayList<PhiResolver.PhiResolverNode> variableOperands
private final ArrayList<PhiResolver.PhiResolverNode> otherOperands
private final HashMap<Value,PhiResolver.PhiResolverNode> operandToNodeMap
protected PhiResolver(LIRGeneratorTool gen, LIRInsertionBuffer buffer, List<LIRInstruction> instructions, int insertBefore)
public static PhiResolver create(LIRGeneratorTool gen)
public static PhiResolver create(LIRGeneratorTool gen, LIRInsertionBuffer buffer, List<LIRInstruction> instructions, int insertBefore)
public void dispose()
private PhiResolver.PhiResolverNode createNode(Value operand, boolean source)
private PhiResolver.PhiResolverNode destinationNode(Value opr)
private void move(PhiResolver.PhiResolverNode dest, PhiResolver.PhiResolverNode src)
private void moveTempTo(Value dest)
private void moveToTemp(Value src)
private PhiResolver.PhiResolverNode sourceNode(Value opr)