Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/InsertStateAfterPlaceholderPhase.java @ 5672:272ad540c464
Canoncialize < to |<| for positive values
Canoncialize IndexedLocation even for long constant index if the final displacement fits in an int
remove PlaceHolderNodes when they don't hold a state
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Thu, 21 Jun 2012 16:29:14 +0200 |
parents | a9b615da0cba |
children |
comparison
equal
deleted
inserted
replaced
5671:a65b2a11bf34 | 5672:272ad540c464 |
---|---|
27 import com.oracle.graal.nodes.spi.*; | 27 import com.oracle.graal.nodes.spi.*; |
28 import com.oracle.graal.nodes.type.*; | 28 import com.oracle.graal.nodes.type.*; |
29 | 29 |
30 public class InsertStateAfterPlaceholderPhase extends Phase { | 30 public class InsertStateAfterPlaceholderPhase extends Phase { |
31 | 31 |
32 private static class PlaceholderNode extends AbstractStateSplit implements StateSplit, Node.IterableNodeType, LIRLowerable { | 32 private static class PlaceholderNode extends AbstractStateSplit implements StateSplit, Node.IterableNodeType, LIRLowerable, Canonicalizable { |
33 public PlaceholderNode() { | 33 public PlaceholderNode() { |
34 super(StampFactory.forVoid()); | 34 super(StampFactory.forVoid()); |
35 } | 35 } |
36 | 36 |
37 @Override | 37 @Override |
41 | 41 |
42 @Override | 42 @Override |
43 public boolean hasSideEffect() { | 43 public boolean hasSideEffect() { |
44 return false; | 44 return false; |
45 } | 45 } |
46 | |
47 @Override | |
48 public ValueNode canonical(CanonicalizerTool tool) { | |
49 if (stateAfter() == null) { | |
50 return null; | |
51 } | |
52 return this; | |
53 } | |
46 } | 54 } |
47 | 55 |
48 @Override | 56 @Override |
49 protected void run(StructuredGraph graph) { | 57 protected void run(StructuredGraph graph) { |
50 for (ReturnNode ret : graph.getNodes(ReturnNode.class)) { | 58 for (ReturnNode ret : graph.getNodes(ReturnNode.class)) { |