Mercurial > hg > truffle
comparison graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/Phase.java @ 2981:42681ed31c4d
Some LoopCounter work
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Wed, 15 Jun 2011 11:20:26 +0200 |
parents | 9d80049e76bd |
children | 53dcb0794619 |
comparison
equal
deleted
inserted
replaced
2980:a0b1b22e58cd | 2981:42681ed31c4d |
---|---|
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 package com.oracle.max.graal.compiler.phases; | 23 package com.oracle.max.graal.compiler.phases; |
24 | 24 |
25 import com.oracle.max.graal.compiler.*; | 25 import com.oracle.max.graal.compiler.*; |
26 import com.oracle.max.graal.compiler.observer.*; | |
27 import com.oracle.max.graal.compiler.schedule.*; | |
26 import com.oracle.max.graal.graph.Graph; | 28 import com.oracle.max.graal.graph.Graph; |
27 | 29 |
28 public abstract class Phase { | 30 public abstract class Phase { |
29 | 31 |
30 private final String name; | 32 private final String name; |
65 int createdNodeCount = graph.getNodeCount() - startNodeCount + deletedNodeCount; | 67 int createdNodeCount = graph.getNodeCount() - startNodeCount + deletedNodeCount; |
66 GraalMetrics.get(getName().concat(".executed")).increment(); | 68 GraalMetrics.get(getName().concat(".executed")).increment(); |
67 GraalMetrics.get(getName().concat(".deletedNodes")).increment(deletedNodeCount); | 69 GraalMetrics.get(getName().concat(".deletedNodes")).increment(deletedNodeCount); |
68 GraalMetrics.get(getName().concat(".createdNodes")).increment(createdNodeCount); | 70 GraalMetrics.get(getName().concat(".createdNodes")).increment(createdNodeCount); |
69 } | 71 } |
72 GraalCompilation compilation = GraalCompilation.compilation(); | |
73 if (compilation.compiler.isObserved() && this.getClass() != IdentifyBlocksPhase.class) { | |
74 compilation.compiler.fireCompilationEvent(new CompilationEvent(compilation, "After " + getName(), graph, true, false)); | |
75 } | |
70 | 76 |
71 // (Item|Graph|Phase|Value) | 77 // (Item|Graph|Phase|Value) |
72 } | 78 } |
73 | 79 |
74 public final String getName() { | 80 public final String getName() { |