src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest2.java
equal
deleted
inserted
replaced
107 } |
107 } |
108 |
108 |
109 @Test |
109 @Test |
110 public void testRedundantCompares() { |
110 public void testRedundantCompares() { |
111 StructuredGraph graph = parseEager("testRedundantComparesSnippet", AllowAssumptions.YES); |
111 StructuredGraph graph = parseEager("testRedundantComparesSnippet", AllowAssumptions.YES); |
112 CanonicalizerPhase canonicalizer = new CanonicalizerPhase(); |
112 CanonicalizerPhase canonicalizer = createCanonicalizerPhase(); |
113 CoreProviders context = getProviders(); |
113 CoreProviders context = getProviders(); |
114 |
114 |
115 new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context); |
115 new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context); |
116 canonicalizer.apply(graph, context); |
116 canonicalizer.apply(graph, context); |
117 new FloatingReadPhase().apply(graph); |
117 new FloatingReadPhase().apply(graph); |
130 |
130 |
131 @Test |
131 @Test |
132 public void testInstanceOfCheckCastLowered() { |
132 public void testInstanceOfCheckCastLowered() { |
133 StructuredGraph graph = parseEager("testInstanceOfCheckCastSnippet", AllowAssumptions.YES); |
133 StructuredGraph graph = parseEager("testInstanceOfCheckCastSnippet", AllowAssumptions.YES); |
134 |
134 |
135 CanonicalizerPhase canonicalizer = new CanonicalizerPhase(); |
135 CanonicalizerPhase canonicalizer = createCanonicalizerPhase(); |
136 CoreProviders context = getProviders(); |
136 CoreProviders context = getProviders(); |
137 |
137 |
138 new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context); |
138 new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context); |
139 canonicalizer.apply(graph, context); |
139 canonicalizer.apply(graph, context); |
140 new ConditionalEliminationPhase(true).apply(graph, context); |
140 new ConditionalEliminationPhase(true).apply(graph, context); |
144 } |
144 } |
145 |
145 |
146 private void checkInstanceOfCount(String methodName, int count) { |
146 private void checkInstanceOfCount(String methodName, int count) { |
147 StructuredGraph graph = parseEager(methodName, AllowAssumptions.YES); |
147 StructuredGraph graph = parseEager(methodName, AllowAssumptions.YES); |
148 |
148 |
149 CanonicalizerPhase canonicalizer = new CanonicalizerPhase(); |
149 CanonicalizerPhase canonicalizer = this.createCanonicalizerPhase(); |
150 CoreProviders context = getProviders(); |
150 CoreProviders context = getProviders(); |
151 |
151 |
152 canonicalizer.apply(graph, context); |
152 canonicalizer.apply(graph, context); |
153 new ConditionalEliminationPhase(true).apply(graph, context); |
153 new ConditionalEliminationPhase(true).apply(graph, context); |
154 getDebugContext().dump(DebugContext.BASIC_LEVEL, graph, "After ConditionalEliminationPhase"); |
154 getDebugContext().dump(DebugContext.BASIC_LEVEL, graph, "After ConditionalEliminationPhase"); |