# HG changeset patch # User Gilles Duboscq # Date 1389871109 -3600 # Node ID 32af063cc29c7f2f03b09e232eee12c0f31c6fb0 # Parent 966f65db51152e67c68b9f2b6bf7b945291100eb Don't create null guards for values that are already known to be non-null. diff -r 966f65db5115 -r 32af063cc29c graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotLoweringProvider.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotLoweringProvider.java Wed Jan 15 21:30:34 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotLoweringProvider.java Thu Jan 16 12:18:29 2014 +0100 @@ -705,6 +705,9 @@ } private static GuardingNode createNullCheck(ValueNode object, FixedNode before, LoweringTool tool) { + if (ObjectStamp.isObjectNonNull(object)) { + return null; + } return tool.createGuard(before, before.graph().unique(new IsNullNode(object)), DeoptimizationReason.NullCheckException, DeoptimizationAction.InvalidateReprofile, true); }