Mercurial > hg > graal-compiler
changeset 15532:fd47de8808fc
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 06 May 2014 11:34:23 +0200 |
parents | a71192a503fe (diff) 44d700e2faba (current diff) |
children | d6c80b8b414f |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CompressionNode.java |
diffstat | 4 files changed, 22 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CompressionNode.java Tue May 06 10:35:06 2014 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CompressionNode.java Tue May 06 11:34:23 2014 +0200 @@ -90,7 +90,7 @@ } break; } - throw GraalInternalError.shouldNotReachHere(); + throw GraalInternalError.shouldNotReachHere(String.format("Unexpected input stamp %s", input)); } public ValueNode getInput() {
--- a/graal/com.oracle.graal.nodes.test/src/com/oracle/graal/nodes/test/ObjectStampJoinTest.java Tue May 06 10:35:06 2014 +0200 +++ b/graal/com.oracle.graal.nodes.test/src/com/oracle/graal/nodes/test/ObjectStampJoinTest.java Tue May 06 11:34:23 2014 +0200 @@ -122,6 +122,24 @@ } @Test + public void testJoin8() { + Stamp bExact = StampFactory.exactNonNull(getType(B.class)); + Stamp dExact = StampFactory.exact(getType(D.class)); + Stamp join = join(bExact, dExact); + Assert.assertFalse(join.isLegal()); + } + + @Test + public void testJoin9() { + Stamp bExact = StampFactory.exact(getType(B.class)); + Stamp dExact = StampFactory.exact(getType(D.class)); + Stamp join = join(bExact, dExact); + Assert.assertTrue(StampTool.isObjectAlwaysNull(join)); + Assert.assertNull(StampTool.typeOrNull(join)); + Assert.assertNull(StampTool.typeOrNull(join)); + } + + @Test public void testJoinInterface0() { Stamp a = StampFactory.declared(getType(A.class)); Stamp b = StampFactory.declared(getType(I.class));
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoweredAtomicReadAndWriteNode.java Tue May 06 10:35:06 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoweredAtomicReadAndWriteNode.java Tue May 06 11:34:23 2014 +0200 @@ -41,7 +41,7 @@ @Input(InputType.State) private FrameState stateAfter; public LoweredAtomicReadAndWriteNode(ValueNode object, LocationNode location, ValueNode newValue, BarrierType barrierType, boolean compressible) { - super(object, location, newValue.stamp(), barrierType, compressible); + super(object, location, newValue.stamp().unrestricted(), barrierType, compressible); this.newValue = newValue; }
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CanonicalizerPhase.java Tue May 06 10:35:06 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CanonicalizerPhase.java Tue May 06 11:34:23 2014 +0200 @@ -185,7 +185,8 @@ boolean improvedStamp = tryInferStamp(valueNode); Constant constant = valueNode.stamp().asConstant(); if (constant != null && !(node instanceof ConstantNode)) { - performReplacement(valueNode, ConstantNode.forConstant(valueNode.stamp(), constant, context.getMetaAccess(), valueNode.graph())); + valueNode.replaceAtUsages(ConstantNode.forConstant(valueNode.stamp(), constant, context.getMetaAccess(), valueNode.graph())); + GraphUtil.tryKillUnused(valueNode); } else if (improvedStamp) { // the improved stamp may enable additional canonicalization tryCanonicalize(valueNode, nodeClass);