# HG changeset patch # User Stefan Anzinger # Date 1430394564 -7200 # Node ID 5bf34f45066026df92dfddc85e63d03d9ba7403f # Parent 3e96f7c93dd1f9177b404bd70a01b19581fc15a6# Parent 0c03a7b7081f49f75443fb2690e5e239e682eaa0 Merge diff -r 3e96f7c93dd1 -r 5bf34f450660 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadFieldNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadFieldNode.java Thu Apr 30 13:17:09 2015 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/LoadFieldNode.java Thu Apr 30 13:49:24 2015 +0200 @@ -78,7 +78,7 @@ } } if (!isStatic() && forObject.isNullConstant()) { - return new DeoptimizeNode(DeoptimizationAction.None, DeoptimizationReason.NullCheckException); + return new DeoptimizeNode(DeoptimizationAction.InvalidateReprofile, DeoptimizationReason.NullCheckException); } return this; } diff -r 3e96f7c93dd1 -r 5bf34f450660 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/DominatorConditionalEliminationPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/DominatorConditionalEliminationPhase.java Thu Apr 30 13:17:09 2015 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/DominatorConditionalEliminationPhase.java Thu Apr 30 13:49:24 2015 +0200 @@ -40,7 +40,7 @@ import com.oracle.graal.nodes.java.*; import com.oracle.graal.nodes.util.*; import com.oracle.graal.phases.*; -import com.oracle.graal.phases.common.LoweringPhase.*; +import com.oracle.graal.phases.common.LoweringPhase.Frame; import com.oracle.graal.phases.schedule.*; public class DominatorConditionalEliminationPhase extends Phase { @@ -54,8 +54,8 @@ } private static final class InfoElement { - private Stamp stamp; - private ValueNode guard; + private final Stamp stamp; + private final ValueNode guard; public InfoElement(Stamp stamp, ValueNode guard) { this.stamp = stamp; @@ -69,10 +69,15 @@ public ValueNode getGuard() { return guard; } + + @Override + public String toString() { + return stamp + " -> " + guard; + } } private static final class Info { - private ArrayList infos; + private final ArrayList infos; public Info() { infos = new ArrayList<>(); @@ -267,7 +272,7 @@ } private void registerCondition(LogicNode condition, boolean negated, ValueNode guard, List undoOperations) { - this.registerNewStamp(condition, negated ? StampFactory.contradiction() : StampFactory.tautology(), guard, undoOperations); + registerNewStamp(condition, negated ? StampFactory.contradiction() : StampFactory.tautology(), guard, undoOperations); } private Iterable getInfoElements(ValueNode proxiedValue) { @@ -368,11 +373,11 @@ if (this.loopExits.isEmpty()) { return tryProofCondition(shortCircuitOrNode.getX(), (guard, result) -> { if (result == !shortCircuitOrNode.isXNegated()) { - return rewireGuards(guard, result, rewireGuardFunction); + return rewireGuards(guard, true, rewireGuardFunction); } else { return tryProofCondition(shortCircuitOrNode.getY(), (innerGuard, innerResult) -> { if (innerGuard == guard) { - return rewireGuards(guard, shortCircuitOrNode.isYNegated() ? !innerResult : innerResult, rewireGuardFunction); + return rewireGuards(guard, innerResult ^ shortCircuitOrNode.isYNegated(), rewireGuardFunction); } return false; });