Mercurial > hg > truffle
changeset 19228:6340d851894b
Don't make LowLevelPhase generic but only the apply() method.
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Mon Feb 09 18:23:16 2015 +0100 @@ -351,13 +351,13 @@ public static <T extends AbstractBlock<T>> LIRGenerationResult emitLowLevel(TargetDescription target, List<T> codeEmittingOrder, List<T> linearScanOrder, LIRGenerationResult lirGenRes, LIRGeneratorTool lirGen, LowLevelCompilerConfiguration config) { LowLevelHighTierContext highTierContext = new LowLevelHighTierContext(lirGen); - config.<T> createHighTier().apply(target, lirGenRes, codeEmittingOrder, linearScanOrder, highTierContext); + config.createHighTier().apply(target, lirGenRes, codeEmittingOrder, linearScanOrder, highTierContext); LowLevelMidTierContext midTierContext = new LowLevelMidTierContext(); - config.<T> createMidTier().apply(target, lirGenRes, codeEmittingOrder, linearScanOrder, midTierContext); + config.createMidTier().apply(target, lirGenRes, codeEmittingOrder, linearScanOrder, midTierContext); LowLevelLowTierContext lowTierContext = new LowLevelLowTierContext(); - config.<T> createLowTier().apply(target, lirGenRes, codeEmittingOrder, linearScanOrder, lowTierContext); + config.createLowTier().apply(target, lirGenRes, codeEmittingOrder, linearScanOrder, lowTierContext); return lirGenRes; }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ControlFlowOptimizer.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ControlFlowOptimizer.java Mon Feb 09 18:23:16 2015 +0100 @@ -35,13 +35,13 @@ /** * This class performs basic optimizations on the control flow graph after LIR generation. */ -public final class ControlFlowOptimizer<B extends AbstractBlock<B>> extends LowLevelLowTierPhase<B> { +public final class ControlFlowOptimizer extends LowLevelLowTierPhase { /** * Performs control flow optimizations on the given LIR graph. */ @Override - protected void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { + protected <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { LIR lir = lirGenRes.getLIR(); new Optimizer<B>(lir).deleteEmptyBlocks(codeEmittingOrder); }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/EdgeMoveOptimizer.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/EdgeMoveOptimizer.java Mon Feb 09 18:23:16 2015 +0100 @@ -48,10 +48,10 @@ * Because this optimization works best when a block contains only a few moves, it has a huge impact * on the number of blocks that are totally empty. */ -public final class EdgeMoveOptimizer<B extends AbstractBlock<B>> extends LowLevelLowTierPhase<B> { +public final class EdgeMoveOptimizer extends LowLevelLowTierPhase { @Override - protected void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { + protected <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { LIR ir = lirGenRes.getLIR(); Optimizer optimizer = new Optimizer(ir);
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/NullCheckOptimizer.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/NullCheckOptimizer.java Mon Feb 09 18:23:16 2015 +0100 @@ -31,10 +31,10 @@ import com.oracle.graal.lir.gen.*; import com.oracle.graal.lir.phases.*; -public final class NullCheckOptimizer<B extends AbstractBlock<B>> extends LowLevelLowTierPhase<B> { +public final class NullCheckOptimizer extends LowLevelLowTierPhase { @Override - protected void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { + protected <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { LIR ir = lirGenRes.getLIR(); List<? extends AbstractBlock<?>> blocks = ir.codeEmittingOrder(); NullCheckOptimizer.foldNullChecks(ir, blocks, target.implicitNullCheckLimit);
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/RedundantMoveElimination.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/RedundantMoveElimination.java Mon Feb 09 18:23:16 2015 +0100 @@ -41,10 +41,10 @@ /** * Removes move instructions, where the destination value is already in place. */ -public final class RedundantMoveElimination<B extends AbstractBlock<B>> extends LowLevelLowTierPhase<B> { +public final class RedundantMoveElimination extends LowLevelLowTierPhase { @Override - protected void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { + protected <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { Optimization redundantMoveElimination = new Optimization(); redundantMoveElimination.doOptimize(lirGenRes.getLIR(), lirGenRes.getFrameMap()); }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/LinearScanPhase.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/LinearScanPhase.java Mon Feb 09 18:23:16 2015 +0100 @@ -29,10 +29,10 @@ import com.oracle.graal.lir.gen.*; import com.oracle.graal.lir.phases.*; -public final class LinearScanPhase<B extends AbstractBlock<B>> extends LowLevelMidTierPhase<B> { +public final class LinearScanPhase extends LowLevelMidTierPhase { @Override - protected void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { + protected <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { new LinearScan(target, lirGenRes).allocate(); }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/LocationMarker.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/LocationMarker.java Mon Feb 09 18:23:16 2015 +0100 @@ -42,7 +42,7 @@ * Mark all live references for a frame state. The frame state use this information to build the OOP * maps. */ -public final class LocationMarker<B extends AbstractBlock<B>> extends LowLevelMidTierPhase<B> { +public final class LocationMarker extends LowLevelMidTierPhase { public static class Options { // @formatter:off @@ -52,7 +52,7 @@ } @Override - protected void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { + protected <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { new Marker(lirGenRes.getLIR(), lirGenRes.getFrameMap()).build(); }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/constopt/ConstantLoadOptimization.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/constopt/ConstantLoadOptimization.java Mon Feb 09 18:23:16 2015 +0100 @@ -47,7 +47,7 @@ * a constant, which is potentially scheduled into a block with high probability, with one or more * definitions in blocks with a lower probability. */ -public final class ConstantLoadOptimization<B extends AbstractBlock<B>> extends LowLevelHighTierPhase<B> { +public final class ConstantLoadOptimization extends LowLevelHighTierPhase { public static class Options { // @formatter:off @@ -57,7 +57,7 @@ } @Override - protected void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, LIRGeneratorTool lirGen) { + protected <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, LIRGeneratorTool lirGen) { new Optimization(lirGenRes.getLIR(), lirGen).apply(); }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/DefaultLowLevelCompilerConfiguration.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/DefaultLowLevelCompilerConfiguration.java Mon Feb 09 18:23:16 2015 +0100 @@ -22,7 +22,6 @@ */ package com.oracle.graal.lir.phases; -import com.oracle.graal.compiler.common.cfg.*; import com.oracle.graal.lir.*; import com.oracle.graal.lir.alloc.lsra.*; import com.oracle.graal.lir.constopt.*; @@ -33,35 +32,35 @@ public class DefaultLowLevelCompilerConfiguration implements LowLevelCompilerConfiguration { - public <B extends AbstractBlock<B>> LowLevelPhaseSuite<LowLevelHighTierContext, B> createHighTier() { - LowLevelPhaseSuite<LowLevelHighTierContext, B> suite = new LowLevelPhaseSuite<>(LowLevelHighTierContext.class); + public LowLevelPhaseSuite<LowLevelHighTierContext> createHighTier() { + LowLevelPhaseSuite<LowLevelHighTierContext> suite = new LowLevelPhaseSuite<>(LowLevelHighTierContext.class); if (ConstantLoadOptimization.Options.ConstantLoadOptimization.getValue()) { - suite.appendPhase(new ConstantLoadOptimization<B>()); + suite.appendPhase(new ConstantLoadOptimization()); } return suite; } - public <B extends AbstractBlock<B>> LowLevelPhaseSuite<LowLevelMidTierContext, B> createMidTier() { - LowLevelPhaseSuite<LowLevelMidTierContext, B> suite = new LowLevelPhaseSuite<>(LowLevelMidTierContext.class); - suite.appendPhase(new LinearScanPhase<B>()); + public LowLevelPhaseSuite<LowLevelMidTierContext> createMidTier() { + LowLevelPhaseSuite<LowLevelMidTierContext> suite = new LowLevelPhaseSuite<>(LowLevelMidTierContext.class); + suite.appendPhase(new LinearScanPhase()); // build frame map if (LSStackSlotAllocator.Options.LSStackSlotAllocation.getValue()) { - suite.appendPhase(new LSStackSlotAllocator<B>()); + suite.appendPhase(new LSStackSlotAllocator()); } else { - suite.appendPhase(new SimpleStackSlotAllocator<B>()); + suite.appendPhase(new SimpleStackSlotAllocator()); } // currently we mark locations only if we do register allocation - suite.appendPhase(new LocationMarker<B>()); + suite.appendPhase(new LocationMarker()); return suite; } - public <B extends AbstractBlock<B>> LowLevelPhaseSuite<LowLevelLowTierContext, B> createLowTier() { - LowLevelPhaseSuite<LowLevelLowTierContext, B> suite = new LowLevelPhaseSuite<>(LowLevelLowTierContext.class); - suite.appendPhase(new EdgeMoveOptimizer<B>()); - suite.appendPhase(new ControlFlowOptimizer<B>()); - suite.appendPhase(new RedundantMoveElimination<B>()); - suite.appendPhase(new NullCheckOptimizer<B>()); + public LowLevelPhaseSuite<LowLevelLowTierContext> createLowTier() { + LowLevelPhaseSuite<LowLevelLowTierContext> suite = new LowLevelPhaseSuite<>(LowLevelLowTierContext.class); + suite.appendPhase(new EdgeMoveOptimizer()); + suite.appendPhase(new ControlFlowOptimizer()); + suite.appendPhase(new RedundantMoveElimination()); + suite.appendPhase(new NullCheckOptimizer()); return suite; }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LowLevelCompilerConfiguration.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LowLevelCompilerConfiguration.java Mon Feb 09 18:23:16 2015 +0100 @@ -22,16 +22,15 @@ */ package com.oracle.graal.lir.phases; -import com.oracle.graal.compiler.common.cfg.*; import com.oracle.graal.lir.phases.LowLevelHighTierPhase.LowLevelHighTierContext; import com.oracle.graal.lir.phases.LowLevelLowTierPhase.LowLevelLowTierContext; import com.oracle.graal.lir.phases.LowLevelMidTierPhase.LowLevelMidTierContext; public interface LowLevelCompilerConfiguration { - <B extends AbstractBlock<B>> LowLevelPhaseSuite<LowLevelHighTierContext, B> createHighTier(); + LowLevelPhaseSuite<LowLevelHighTierContext> createHighTier(); - <B extends AbstractBlock<B>> LowLevelPhaseSuite<LowLevelMidTierContext, B> createMidTier(); + LowLevelPhaseSuite<LowLevelMidTierContext> createMidTier(); - <B extends AbstractBlock<B>> LowLevelPhaseSuite<LowLevelLowTierContext, B> createLowTier(); + LowLevelPhaseSuite<LowLevelLowTierContext> createLowTier(); }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LowLevelHighTierPhase.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LowLevelHighTierPhase.java Mon Feb 09 18:23:16 2015 +0100 @@ -28,7 +28,7 @@ import com.oracle.graal.compiler.common.cfg.*; import com.oracle.graal.lir.gen.*; -public abstract class LowLevelHighTierPhase<B extends AbstractBlock<B>> extends LowLevelPhase<LowLevelHighTierPhase.LowLevelHighTierContext, B> { +public abstract class LowLevelHighTierPhase extends LowLevelPhase<LowLevelHighTierPhase.LowLevelHighTierContext> { public static final class LowLevelHighTierContext { private final LIRGeneratorTool lirGen; @@ -40,10 +40,10 @@ } @Override - protected final void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, LowLevelHighTierContext context) { + protected final <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, LowLevelHighTierContext context) { run(target, lirGenRes, codeEmittingOrder, linearScanOrder, context.lirGen); } - protected abstract void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, LIRGeneratorTool lirGen); + protected abstract <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, LIRGeneratorTool lirGen); }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LowLevelLowTierPhase.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LowLevelLowTierPhase.java Mon Feb 09 18:23:16 2015 +0100 @@ -28,16 +28,16 @@ import com.oracle.graal.compiler.common.cfg.*; import com.oracle.graal.lir.gen.*; -public abstract class LowLevelLowTierPhase<B extends AbstractBlock<B>> extends LowLevelPhase<LowLevelLowTierPhase.LowLevelLowTierContext, B> { +public abstract class LowLevelLowTierPhase extends LowLevelPhase<LowLevelLowTierPhase.LowLevelLowTierContext> { public static final class LowLevelLowTierContext { } @Override - protected final void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, LowLevelLowTierContext context) { + protected final <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, LowLevelLowTierContext context) { run(target, lirGenRes, codeEmittingOrder, linearScanOrder); } - protected abstract void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder); + protected abstract <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder); }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LowLevelMidTierPhase.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LowLevelMidTierPhase.java Mon Feb 09 18:23:16 2015 +0100 @@ -28,16 +28,16 @@ import com.oracle.graal.compiler.common.cfg.*; import com.oracle.graal.lir.gen.*; -public abstract class LowLevelMidTierPhase<B extends AbstractBlock<B>> extends LowLevelPhase<LowLevelMidTierPhase.LowLevelMidTierContext, B> { +public abstract class LowLevelMidTierPhase extends LowLevelPhase<LowLevelMidTierPhase.LowLevelMidTierContext> { public static final class LowLevelMidTierContext { } @Override - protected void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, LowLevelMidTierContext context) { + protected <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, LowLevelMidTierContext context) { run(target, lirGenRes, codeEmittingOrder, linearScanOrder); } - protected abstract void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder); + protected abstract <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder); }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LowLevelPhase.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LowLevelPhase.java Mon Feb 09 18:23:16 2015 +0100 @@ -38,7 +38,7 @@ * Base class for all {@link LIR low-level} phases. Subclasses should be stateless. There will be * one global instance for each phase that is shared for all compilations. */ -public abstract class LowLevelPhase<C, B extends AbstractBlock<B>> { +public abstract class LowLevelPhase<C> { private static final int PHASE_DUMP_LEVEL = 2; @@ -73,11 +73,11 @@ memUseTracker = Debug.memUseTracker("LowLevelPhaseMemUse_%s", getClass()); } - public final void apply(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, C context) { + public final <B extends AbstractBlock<B>> void apply(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, C context) { apply(target, lirGenRes, codeEmittingOrder, linearScanOrder, context, true); } - public final void apply(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, C context, boolean dumpLIR) { + public final <B extends AbstractBlock<B>> void apply(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, C context, boolean dumpLIR) { try (TimerCloseable a = timer.start(); Scope s = Debug.scope(getName(), this); Closeable c = memUseTracker.start()) { run(target, lirGenRes, codeEmittingOrder, linearScanOrder, context); if (dumpLIR && Debug.isDumpEnabled(PHASE_DUMP_LEVEL)) { @@ -88,7 +88,7 @@ } } - protected abstract void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, C context); + protected abstract <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, C context); protected CharSequence createName() { String className = LowLevelPhase.this.getClass().getName();
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LowLevelPhaseSuite.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LowLevelPhaseSuite.java Mon Feb 09 18:23:16 2015 +0100 @@ -28,8 +28,8 @@ import com.oracle.graal.compiler.common.cfg.*; import com.oracle.graal.lir.gen.*; -public class LowLevelPhaseSuite<C, B extends AbstractBlock<B>> extends LowLevelPhase<C, B> { - private final List<LowLevelPhase<C, B>> phases; +public class LowLevelPhaseSuite<C> extends LowLevelPhase<C> { + private final List<LowLevelPhase<C>> phases; public LowLevelPhaseSuite(Class<C> contextClass) { super(getNameFromContext(contextClass)); @@ -49,19 +49,19 @@ /** * Add a new phase at the beginning of this suite. */ - public final void prependPhase(LowLevelPhase<C, B> phase) { + public final void prependPhase(LowLevelPhase<C> phase) { phases.add(0, phase); } /** * Add a new phase at the end of this suite. */ - public final void appendPhase(LowLevelPhase<C, B> phase) { + public final void appendPhase(LowLevelPhase<C> phase) { phases.add(phase); } - public final ListIterator<LowLevelPhase<C, B>> findPhase(Class<? extends LowLevelPhase<C, B>> phaseClass) { - ListIterator<LowLevelPhase<C, B>> it = phases.listIterator(); + public final ListIterator<LowLevelPhase<C>> findPhase(Class<? extends LowLevelPhase<C>> phaseClass) { + ListIterator<LowLevelPhase<C>> it = phases.listIterator(); if (findNextPhase(it, phaseClass)) { return it; } else { @@ -69,9 +69,9 @@ } } - public static <C, B extends AbstractBlock<B>> boolean findNextPhase(ListIterator<LowLevelPhase<C, B>> it, Class<? extends LowLevelPhase<C, B>> phaseClass) { + public static <C> boolean findNextPhase(ListIterator<LowLevelPhase<C>> it, Class<? extends LowLevelPhase<C>> phaseClass) { while (it.hasNext()) { - LowLevelPhase<C, B> phase = it.next(); + LowLevelPhase<C> phase = it.next(); if (phaseClass.isInstance(phase)) { return true; } @@ -80,8 +80,8 @@ } @Override - protected void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, C context) { - for (LowLevelPhase<C, B> phase : phases) { + protected <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, C context) { + for (LowLevelPhase<C> phase : phases) { phase.apply(target, lirGenRes, codeEmittingOrder, linearScanOrder, context); } }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/LSStackSlotAllocator.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/LSStackSlotAllocator.java Mon Feb 09 18:23:16 2015 +0100 @@ -51,7 +51,7 @@ * {@link OperandFlag#UNINITIALIZED}. Otherwise the stack slot might be reused and its content * destroyed. */ -public final class LSStackSlotAllocator<B extends AbstractBlock<B>> extends LowLevelMidTierPhase<B> implements StackSlotAllocator { +public final class LSStackSlotAllocator extends LowLevelMidTierPhase implements StackSlotAllocator { public static class Options { // @formatter:off @@ -68,7 +68,7 @@ private static final DebugTimer AssignSlotsTimer = Debug.timer("LSStackSlotAllocator[AssignSlots]"); @Override - protected void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { + protected <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { lirGenRes.buildFrameMap(this); }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/SimpleStackSlotAllocator.java Mon Feb 09 15:24:15 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/SimpleStackSlotAllocator.java Mon Feb 09 18:23:16 2015 +0100 @@ -36,10 +36,10 @@ import com.oracle.graal.lir.gen.*; import com.oracle.graal.lir.phases.*; -public class SimpleStackSlotAllocator<B extends AbstractBlock<B>> extends LowLevelMidTierPhase<B> implements StackSlotAllocator { +public class SimpleStackSlotAllocator extends LowLevelMidTierPhase implements StackSlotAllocator { @Override - protected void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { + protected <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { lirGenRes.buildFrameMap(this); }