comparison graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/CompareCanonicalizerTest.java @ 12045:0fc653a9e019

made GraalCodeCacheProvider independent of CodeCacheProvider and renamed the former to LoweringProvider (GRAAL-511)
author Doug Simon <doug.simon@oracle.com>
date Thu, 10 Oct 2013 20:50:54 +0200
parents 23ccaa863eda
children 0afe7370260c
comparison
equal deleted inserted replaced
12044:6aef5b6bbdd8 12045:0fc653a9e019
34 34
35 public class CompareCanonicalizerTest extends GraalCompilerTest { 35 public class CompareCanonicalizerTest extends GraalCompilerTest {
36 36
37 private StructuredGraph getCanonicalizedGraph(String name) { 37 private StructuredGraph getCanonicalizedGraph(String name) {
38 StructuredGraph graph = parse(name); 38 StructuredGraph graph = parse(name);
39 new CanonicalizerPhase(true).apply(graph, new PhaseContext(getMetaAccess(), getCodeCache(), null, replacements)); 39 new CanonicalizerPhase(true).apply(graph, new PhaseContext(getMetaAccess(), getCodeCache(), getLowerer(), null, replacements));
40 return graph; 40 return graph;
41 } 41 }
42 42
43 private static ValueNode getResult(StructuredGraph graph) { 43 private static ValueNode getResult(StructuredGraph graph) {
44 assertTrue(graph.start().next() instanceof ReturnNode); 44 assertTrue(graph.start().next() instanceof ReturnNode);
52 for (int i = 1; i < 4; i++) { 52 for (int i = 1; i < 4; i++) {
53 StructuredGraph graph = parse("canonicalCompare" + i); 53 StructuredGraph graph = parse("canonicalCompare" + i);
54 assertEquals(referenceGraph, graph); 54 assertEquals(referenceGraph, graph);
55 } 55 }
56 Assumptions assumptions = new Assumptions(false); 56 Assumptions assumptions = new Assumptions(false);
57 new CanonicalizerPhase(true).apply(referenceGraph, new PhaseContext(getMetaAccess(), getCodeCache(), assumptions, replacements)); 57 new CanonicalizerPhase(true).apply(referenceGraph, new PhaseContext(getMetaAccess(), getCodeCache(), getLowerer(), assumptions, replacements));
58 for (int i = 1; i < 4; i++) { 58 for (int i = 1; i < 4; i++) {
59 StructuredGraph graph = getCanonicalizedGraph("canonicalCompare" + i); 59 StructuredGraph graph = getCanonicalizedGraph("canonicalCompare" + i);
60 assertEquals(referenceGraph, graph); 60 assertEquals(referenceGraph, graph);
61 } 61 }
62 } 62 }