# HG changeset patch # User Roland Schatz # Date 1375434319 -7200 # Node ID 963a090eb1d8fccd26dd228662c7b418cc3f8717 # Parent 2da7f2efe6e281e6bd2d4791614643fbbb6181cd Remove unused methods from PhasePlan. diff -r 2da7f2efe6e2 -r 963a090eb1d8 graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java --- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java Fri Aug 02 11:03:45 2013 +0200 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java Fri Aug 02 11:05:19 2013 +0200 @@ -403,16 +403,6 @@ } /** - * Can be overridden to modify the compilation phases applied for a test. - * - * @param method the method being compiled - * @param graph the graph being compiled - * @param phasePlan the phase plan to be edited - */ - protected void editPhasePlan(ResolvedJavaMethod method, StructuredGraph graph, PhasePlan phasePlan) { - } - - /** * Gets installed code for a given method and graph, compiling it first if necessary. * * @param forceCompile specifies whether to ignore any previous code cached for the (method, @@ -442,7 +432,6 @@ PhasePlan phasePlan = new PhasePlan(); GraphBuilderPhase graphBuilderPhase = new GraphBuilderPhase(runtime, GraphBuilderConfiguration.getDefault(), OptimisticOptimizations.ALL); phasePlan.addPhase(PhasePosition.AFTER_PARSING, graphBuilderPhase); - editPhasePlan(method, graph, phasePlan); CallingConvention cc = getCallingConvention(runtime, Type.JavaCallee, graph.method(), false); final CompilationResult compResult = GraalCompiler.compileGraph(graph, cc, method, runtime, replacements, backend, runtime().getTarget(), null, phasePlan, OptimisticOptimizations.ALL, new SpeculationLog(), suites, new CompilationResult()); diff -r 2da7f2efe6e2 -r 963a090eb1d8 graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/AheadOfTimeCompilationTest.java --- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/AheadOfTimeCompilationTest.java Fri Aug 02 11:03:45 2013 +0200 +++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/AheadOfTimeCompilationTest.java Fri Aug 02 11:05:19 2013 +0200 @@ -202,7 +202,6 @@ PhasePlan phasePlan = new PhasePlan(); GraphBuilderPhase graphBuilderPhase = new GraphBuilderPhase(runtime, GraphBuilderConfiguration.getDefault(), OptimisticOptimizations.ALL); phasePlan.addPhase(PhasePosition.AFTER_PARSING, graphBuilderPhase); - editPhasePlan(method, graph, phasePlan); CallingConvention cc = getCallingConvention(runtime, Type.JavaCallee, graph.method(), false); // create suites everytime, as we modify options for the compiler final Suites suitesLocal = Graal.getRequiredCapability(SuitesProvider.class).createSuites(); diff -r 2da7f2efe6e2 -r 963a090eb1d8 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/PhasePlan.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/PhasePlan.java Fri Aug 02 11:03:45 2013 +0200 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/PhasePlan.java Fri Aug 02 11:05:19 2013 +0200 @@ -54,7 +54,6 @@ // @formatter:on @SuppressWarnings("unchecked") private final ArrayList[] phases = new ArrayList[PhasePosition.values().length]; - private final Set>> disabledPhases = new HashSet<>(); public void addPhase(PhasePosition pos, Phase phase) { if (phases[pos.ordinal()] == null) { @@ -70,12 +69,4 @@ } } } - - public void disablePhase(Class> clazz) { - disabledPhases.add(clazz); - } - - public boolean isPhaseDisabled(Class> clazz) { - return disabledPhases.contains(clazz); - } } diff -r 2da7f2efe6e2 -r 963a090eb1d8 graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/CompiledExceptionHandlerTest.java --- a/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/CompiledExceptionHandlerTest.java Fri Aug 02 11:03:45 2013 +0200 +++ b/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/CompiledExceptionHandlerTest.java Fri Aug 02 11:05:19 2013 +0200 @@ -26,11 +26,9 @@ import org.junit.*; -import com.oracle.graal.api.meta.*; import com.oracle.graal.compiler.test.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.java.*; -import com.oracle.graal.phases.*; import com.oracle.graal.phases.common.*; /** @@ -43,11 +41,6 @@ } @Override - protected void editPhasePlan(ResolvedJavaMethod method, StructuredGraph graph, PhasePlan phasePlan) { - phasePlan.disablePhase(InliningPhase.class); - } - - @Override protected StructuredGraph parse(Method m) { StructuredGraph graph = super.parse(m); int handlers = graph.getNodes().filter(ExceptionObjectNode.class).count(); diff -r 2da7f2efe6e2 -r 963a090eb1d8 graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/DeoptimizeOnExceptionTest.java --- a/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/DeoptimizeOnExceptionTest.java Fri Aug 02 11:03:45 2013 +0200 +++ b/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/DeoptimizeOnExceptionTest.java Fri Aug 02 11:05:19 2013 +0200 @@ -24,10 +24,7 @@ import org.junit.*; -import com.oracle.graal.api.meta.*; import com.oracle.graal.compiler.test.*; -import com.oracle.graal.nodes.*; -import com.oracle.graal.phases.*; import com.oracle.graal.phases.common.*; /** @@ -39,11 +36,6 @@ suites.getHighTier().findPhase(AbstractInliningPhase.class).remove(); } - @Override - protected void editPhasePlan(ResolvedJavaMethod method, StructuredGraph graph, PhasePlan phasePlan) { - phasePlan.disablePhase(InliningPhase.class); - } - private static void raiseException(String m1, String m2, String m3, String m4, String m5) { throw new RuntimeException(m1 + m2 + m3 + m4 + m5); } diff -r 2da7f2efe6e2 -r 963a090eb1d8 graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/InstanceOfTest.java --- a/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/InstanceOfTest.java Fri Aug 02 11:03:45 2013 +0200 +++ b/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/InstanceOfTest.java Fri Aug 02 11:05:19 2013 +0200 @@ -30,7 +30,6 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.java.*; -import com.oracle.graal.phases.*; import com.oracle.graal.phases.common.*; import com.oracle.graal.replacements.test.CheckCastTest.Depth12; import com.oracle.graal.replacements.test.CheckCastTest.Depth13; @@ -47,11 +46,6 @@ } @Override - protected void editPhasePlan(ResolvedJavaMethod method, StructuredGraph graph, PhasePlan phasePlan) { - phasePlan.disablePhase(InliningPhase.class); - } - - @Override protected void replaceProfile(StructuredGraph graph, JavaTypeProfile profile) { InstanceOfNode ion = graph.getNodes().filter(InstanceOfNode.class).first(); if (ion != null) { diff -r 2da7f2efe6e2 -r 963a090eb1d8 graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/InvokeTest.java --- a/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/InvokeTest.java Fri Aug 02 11:03:45 2013 +0200 +++ b/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/InvokeTest.java Fri Aug 02 11:05:19 2013 +0200 @@ -24,10 +24,7 @@ import org.junit.*; -import com.oracle.graal.api.meta.*; import com.oracle.graal.compiler.test.*; -import com.oracle.graal.nodes.*; -import com.oracle.graal.phases.*; import com.oracle.graal.phases.common.*; /** @@ -39,11 +36,6 @@ suites.getHighTier().findPhase(AbstractInliningPhase.class).remove(); } - @Override - protected void editPhasePlan(ResolvedJavaMethod method, StructuredGraph graph, PhasePlan phasePlan) { - phasePlan.disablePhase(InliningPhase.class); - } - public interface I { String virtualMethod(String s);