changeset 13654:32af063cc29c

Don't create null guards for values that are already known to be non-null.
author Gilles Duboscq <duboscq@ssw.jku.at>
date Thu, 16 Jan 2014 12:18:29 +0100
parents 966f65db5115
children fff17b5dff8a 03b42f0fb635
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotLoweringProvider.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);
     }