private static final class EdgeMoveOptimizer.Optimizer extends Object
Modifier and Type | Field and Description |
---|---|
private List<List<LIRInstruction>> |
edgeInstructionSeqences |
private LIR |
ir |
Modifier and Type | Method and Description |
---|---|
private static LIRInstruction |
first(List<LIRInstruction> seq)
Gets the first element from a LIR instruction sequence.
|
private static LIRInstruction |
last(List<LIRInstruction> seq)
Gets the last element from a LIR instruction sequence.
|
private void |
optimizeMovesAtBlockBegin(AbstractBlockBase<?> block)
Moves the longest common subsequence at the start of all successors of
block to the end of block just prior to the branch instruction ending
block . |
private void |
optimizeMovesAtBlockEnd(AbstractBlockBase<?> block)
|
private static void |
removeFirst(List<LIRInstruction> seq)
Removes the first element from a LIR instruction sequence.
|
private static void |
removeLast(List<LIRInstruction> seq)
Removes the last element from a LIR instruction sequence.
|
private static boolean |
same(LIRInstruction op1,
LIRInstruction op2)
|
private final List<List<LIRInstruction>> edgeInstructionSeqences
private static boolean same(LIRInstruction op1, LIRInstruction op2)
op1
- the first instruction to compareop2
- the second instruction to comparetrue
if op1
and op2
are the same by the above algorithmprivate void optimizeMovesAtBlockEnd(AbstractBlockBase<?> block)
private void optimizeMovesAtBlockBegin(AbstractBlockBase<?> block)
block
to the end of block
just prior to the branch instruction ending
block
.private static LIRInstruction first(List<LIRInstruction> seq)
private static LIRInstruction last(List<LIRInstruction> seq)
private static void removeFirst(List<LIRInstruction> seq)
private static void removeLast(List<LIRInstruction> seq)