# HG changeset patch # User Thomas Wuerthinger # Date 1325609606 -3600 # Node ID 4df4499e0289185e93e685b492528051068419b2 # Parent 847e9dcb4980ce10cd0fadb01787e9be1e17ea8c Fixed unit tests. diff -r 847e9dcb4980 -r 4df4499e0289 graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/BoxingEliminationTest.java --- a/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/BoxingEliminationTest.java Tue Jan 03 17:31:23 2012 +0100 +++ b/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/BoxingEliminationTest.java Tue Jan 03 17:53:26 2012 +0100 @@ -91,7 +91,7 @@ StructuredGraph graph = parse(snippet); BoxingMethodPool pool = new BoxingMethodPool(runtime()); IdentifyBoxingPhase identifyBoxingPhase = new IdentifyBoxingPhase(pool); - PhasePlan phasePlan = new PhasePlan(); + PhasePlan phasePlan = getDefaultPhasePlan(); phasePlan.addPhase(PhasePosition.AFTER_PARSING, identifyBoxingPhase); identifyBoxingPhase.apply(graph); LocalNode local = graph.getNodes(LocalNode.class).iterator().next(); diff -r 847e9dcb4980 -r 4df4499e0289 graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/EscapeAnalysisTest.java --- a/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/EscapeAnalysisTest.java Tue Jan 03 17:31:23 2012 +0100 +++ b/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/EscapeAnalysisTest.java Tue Jan 03 17:53:26 2012 +0100 @@ -121,10 +121,10 @@ n.node().setProbability(100000); } - new InliningPhase(null, runtime(), null, null, PhasePlan.DEFAULT).apply(graph); + new InliningPhase(null, runtime(), null, null, getDefaultPhasePlan()).apply(graph); new DeadCodeEliminationPhase().apply(graph); print(graph); - new EscapeAnalysisPhase(null, runtime(), null, PhasePlan.DEFAULT).apply(graph); + new EscapeAnalysisPhase(null, runtime(), null, getDefaultPhasePlan()).apply(graph); print(graph); int retCount = 0; for (ReturnNode ret : graph.getNodes(ReturnNode.class)) { diff -r 847e9dcb4980 -r 4df4499e0289 graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/GraphTest.java --- a/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/GraphTest.java Tue Jan 03 17:31:23 2012 +0100 +++ b/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/GraphTest.java Tue Jan 03 17:53:26 2012 +0100 @@ -31,6 +31,8 @@ import com.oracle.max.cri.ri.*; import com.oracle.max.graal.compiler.*; import com.oracle.max.graal.compiler.graphbuilder.*; +import com.oracle.max.graal.compiler.phases.*; +import com.oracle.max.graal.compiler.phases.PhasePlan.*; import com.oracle.max.graal.cri.*; import com.oracle.max.graal.nodes.*; import com.oracle.max.graal.printer.*; @@ -105,6 +107,12 @@ return graph; } + protected PhasePlan getDefaultPhasePlan() { + PhasePlan plan = new PhasePlan(); + plan.addPhase(PhasePosition.AFTER_PARSING, new GraphBuilderPhase(runtime, null, GraphBuilderConfiguration.getDeoptFreeDefault())); + return plan; + } + protected void print(String title, StructuredGraph... graphs) { if (observer != null) { observer.printGraphs(getClass().getSimpleName() + ": " + title, graphs); diff -r 847e9dcb4980 -r 4df4499e0289 graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/IfBoxingEliminationTest.java --- a/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/IfBoxingEliminationTest.java Tue Jan 03 17:31:23 2012 +0100 +++ b/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/IfBoxingEliminationTest.java Tue Jan 03 17:53:26 2012 +0100 @@ -72,7 +72,7 @@ StructuredGraph graph = parse(snippet); BoxingMethodPool pool = new BoxingMethodPool(runtime()); IdentifyBoxingPhase identifyBoxingPhase = new IdentifyBoxingPhase(pool); - PhasePlan phasePlan = new PhasePlan(); + PhasePlan phasePlan = getDefaultPhasePlan(); phasePlan.addPhase(PhasePosition.AFTER_PARSING, identifyBoxingPhase); phasePlan.addPhase(PhasePosition.AFTER_PARSING, new PhiStampPhase()); identifyBoxingPhase.apply(graph); diff -r 847e9dcb4980 -r 4df4499e0289 graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/InvokeTest.java --- a/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/InvokeTest.java Tue Jan 03 17:31:23 2012 +0100 +++ b/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/InvokeTest.java Tue Jan 03 17:53:26 2012 +0100 @@ -83,7 +83,7 @@ for (Invoke invoke : graph.getInvokes()) { hints.add(invoke); } - new InliningPhase(null, runtime(), hints, null, PhasePlan.DEFAULT).apply(graph); + new InliningPhase(null, runtime(), hints, null, getDefaultPhasePlan()).apply(graph); new CanonicalizerPhase(null, runtime(), null).apply(graph); new DeadCodeEliminationPhase().apply(graph); StructuredGraph referenceGraph = parse(REFERENCE_SNIPPET); diff -r 847e9dcb4980 -r 4df4499e0289 graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/MonitorTest.java --- a/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/MonitorTest.java Tue Jan 03 17:31:23 2012 +0100 +++ b/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/MonitorTest.java Tue Jan 03 17:53:26 2012 +0100 @@ -94,7 +94,7 @@ for (Invoke invoke : graph.getInvokes()) { hints.add(invoke); } - new InliningPhase(null, runtime(), hints, null, PhasePlan.DEFAULT).apply(graph); + new InliningPhase(null, runtime(), hints, null, getDefaultPhasePlan()).apply(graph); new CanonicalizerPhase(null, runtime(), null).apply(graph); new DeadCodeEliminationPhase().apply(graph); return graph;