154 public void test(String name, Class<? extends Node> expectedClass, int expectedCount) { |
154 public void test(String name, Class<? extends Node> expectedClass, int expectedCount) { |
155 StructuredGraph graph = parseEager(name, AllowAssumptions.YES); |
155 StructuredGraph graph = parseEager(name, AllowAssumptions.YES); |
156 |
156 |
157 PhaseContext context = new PhaseContext(getProviders()); |
157 PhaseContext context = new PhaseContext(getProviders()); |
158 CanonicalizerPhase canonicalizer = new CanonicalizerPhase(); |
158 CanonicalizerPhase canonicalizer = new CanonicalizerPhase(); |
|
159 new ConvertDeoptimizeToGuardPhase().apply(graph, context); |
159 graph.clearAllStateAfter(); |
160 graph.clearAllStateAfter(); |
160 graph.setGuardsStage(StructuredGraph.GuardsStage.AFTER_FSA); |
161 graph.setGuardsStage(StructuredGraph.GuardsStage.AFTER_FSA); |
161 canonicalizer.apply(graph, context); |
162 canonicalizer.apply(graph, context); |
162 |
163 |
163 new ConvertDeoptimizeToGuardPhase().apply(graph, context); |
|
164 // new DominatorConditionalEliminationPhase(true).apply(graph, context); |
164 // new DominatorConditionalEliminationPhase(true).apply(graph, context); |
165 new IterativeConditionalEliminationPhase(canonicalizer, true).apply(graph, context); |
165 new IterativeConditionalEliminationPhase(canonicalizer, true).apply(graph, context); |
166 canonicalizer.apply(graph, context); |
166 canonicalizer.apply(graph, context); |
167 canonicalizer.apply(graph, context); |
167 canonicalizer.apply(graph, context); |
168 |
168 |