Mercurial > hg > graal-compiler
changeset 23154:f2a8407253da
TraceRA: move resolution: count number of created stack slots.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Thu, 10 Dec 2015 18:22:07 +0100 |
parents | 40f5437c92e9 |
children | ff575266cf15 |
files | graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/TraceGlobalMoveResolver.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/lsra/TraceLocalMoveResolver.java |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/TraceGlobalMoveResolver.java Thu Dec 10 18:21:43 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/TraceGlobalMoveResolver.java Thu Dec 10 18:22:07 2015 +0100 @@ -48,6 +48,7 @@ import jdk.vm.ci.meta.Value; import com.oracle.graal.debug.Debug; +import com.oracle.graal.debug.DebugMetric; import com.oracle.graal.debug.Indent; import com.oracle.graal.lir.LIRInsertionBuffer; import com.oracle.graal.lir.LIRInstruction; @@ -62,6 +63,8 @@ */ final class TraceGlobalMoveResolver extends TraceGlobalMoveResolutionPhase.MoveResolver { + private static final DebugMetric cycleBreakingSlotsAllocated = Debug.metric("TraceRA[cycleBreakingSlotsAllocated(global)]"); + private int insertIdx; private LIRInsertionBuffer insertionBuffer; // buffer where moves are inserted @@ -388,6 +391,7 @@ Value from = mappingFrom.get(spillCandidate); try (Indent indent = Debug.logAndIndent("BreakCycle: %s", from)) { VirtualStackSlot spillSlot = frameMapBuilder.allocateSpillSlot(from.getLIRKind()); + cycleBreakingSlotsAllocated.increment(); if (Debug.isLogEnabled()) { Debug.log("created new slot for spilling: %s", spillSlot); }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/lsra/TraceLocalMoveResolver.java Thu Dec 10 18:21:43 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/lsra/TraceLocalMoveResolver.java Thu Dec 10 18:22:07 2015 +0100 @@ -45,6 +45,7 @@ import jdk.vm.ci.meta.Value; import com.oracle.graal.debug.Debug; +import com.oracle.graal.debug.DebugMetric; import com.oracle.graal.debug.Indent; import com.oracle.graal.lir.LIRInsertionBuffer; import com.oracle.graal.lir.LIRInstruction; @@ -56,6 +57,8 @@ */ final class TraceLocalMoveResolver { + private static final DebugMetric cycleBreakingSlotsAllocated = Debug.metric("TraceRA[cycleBreakingSlotsAllocated(local)]"); + private static final int STACK_SLOT_IN_CALLER_FRAME_IDX = -1; private final TraceLinearScan allocator; @@ -428,6 +431,7 @@ if (spillSlot1 == null) { spillSlot1 = getAllocator().getFrameMapBuilder().allocateSpillSlot(fromInterval1.kind()); fromInterval1.setSpillSlot(spillSlot1); + cycleBreakingSlotsAllocated.increment(); } spillInterval(spillCandidate, fromInterval1, spillSlot1); return;