# HG changeset patch # User Josef Eisl # Date 1430387504 -7200 # Node ID 0dee8e5f78eabbb76a7ba98d050209c54c3c3f93 # Parent f85b6fd788b5bd392277449fe170c55cb12d68fc SSALinearScan: add meter for phi resolution moves. diff -r f85b6fd788b5 -r 0dee8e5f78ea graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/SSALinearScan.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/SSALinearScan.java Thu Apr 30 16:59:13 2015 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/SSALinearScan.java Thu Apr 30 11:51:44 2015 +0200 @@ -42,6 +42,7 @@ final class SSALinearScan extends LinearScan { + private static final DebugMetric numPhiResolutionMoves = Debug.metric("SSA LSRA[numPhiResolutionMoves]"); private static final DebugMetric numStackToStackMoves = Debug.metric("SSA LSRA[numStackToStackMoves]"); SSALinearScan(TargetDescription target, LIRGenerationResult res, SpillMoveFactory spillMoveFactory, RegisterAllocationConfig regAllocConfig) { @@ -78,10 +79,12 @@ public void visit(Value phiIn, Value phiOut) { Interval toInterval = splitChildAtOpId(intervalFor(phiIn), toBlockFirstInstructionId, LIRInstruction.OperandMode.DEF); if (isConstant(phiOut)) { + numPhiResolutionMoves.increment(); moveResolver.addMapping(phiOut, toInterval); } else { Interval fromInterval = splitChildAtOpId(intervalFor(phiOut), phiOutId, LIRInstruction.OperandMode.DEF); if (fromInterval != toInterval && !fromInterval.location().equals(toInterval.location())) { + numPhiResolutionMoves.increment(); if (!(isStackSlotValue(toInterval.location()) && isStackSlotValue(fromInterval.location()))) { moveResolver.addMapping(fromInterval, toInterval); } else {