comparison graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/GraphBuilderPhase.java @ 2903:eb3a82946429

Measure nodes created and nodes deleted for nodes. New option -G:+Meter.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 08 Jun 2011 17:26:22 +0200
parents 434d71eec7a9
children a6d0743f3380
comparison
equal deleted inserted replaced
2902:434d71eec7a9 2903:eb3a82946429
107 * @param compilation the compilation 107 * @param compilation the compilation
108 * @param ir the IR to build the graph into 108 * @param ir the IR to build the graph into
109 * @param graph 109 * @param graph
110 */ 110 */
111 public GraphBuilderPhase(GraalCompilation compilation, RiMethod method, boolean createUnwind, boolean inline) { 111 public GraphBuilderPhase(GraalCompilation compilation, RiMethod method, boolean createUnwind, boolean inline) {
112 super(inline ? "Build Inline Graph" : "Build Graph"); 112 super(inline ? "BuildInlineGraph" : "BuildGraph");
113 this.compilation = compilation; 113 this.compilation = compilation;
114 114
115 this.runtime = compilation.runtime; 115 this.runtime = compilation.runtime;
116 this.method = method; 116 this.method = method;
117 this.stats = compilation.stats; 117 this.stats = compilation.stats;
199 } 199 }
200 200
201 // remove FrameStates 201 // remove FrameStates
202 for (Node n : graph.getNodes()) { 202 for (Node n : graph.getNodes()) {
203 if (n instanceof FrameState) { 203 if (n instanceof FrameState) {
204 boolean delete = false;
205 if (n.usages().size() == 0 && n.predecessors().size() == 0) { 204 if (n.usages().size() == 0 && n.predecessors().size() == 0) {
206 delete = true;
207 }
208 if (delete) {
209 n.delete(); 205 n.delete();
210 } 206 }
211 } 207 }
212 } 208 }
213 } 209 }