Mercurial > hg > truffle
diff graal/GraalCompiler/src/com/sun/c1x/graph/IR.java @ 2863:4f64bd98f9dc
Canonicalization work
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Tue, 07 Jun 2011 17:04:55 +0200 |
parents | a97605b0489b |
children | fc75fd3fa5e4 |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/IR.java Tue Jun 07 16:13:22 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/graph/IR.java Tue Jun 07 17:04:55 2011 +0200 @@ -26,6 +26,7 @@ import java.util.*; import com.oracle.graal.graph.*; +import com.oracle.max.graal.opt.*; import com.oracle.max.graal.schedule.*; import com.sun.c1x.*; import com.sun.c1x.debug.*; @@ -85,6 +86,7 @@ new PhiSimplifier(this); + // Graph newGraph = new Graph(); // HashMap<Node, Node> replacement = new HashMap<Node, Node>(); // replacement.put(compilation.graph.start(), newGraph.start()); @@ -94,6 +96,11 @@ Graph graph = compilation.graph; + if (C1XOptions.OptCanonicalizer) { + new CanonicalizerPhase().apply(graph); + verifyAndPrint("After canonicalization"); + } + // Split critical edges. List<Node> nodes = graph.getNodes(); for (int i = 0; i < nodes.size(); ++i) {