Mercurial > hg > graal-jvmci-8
changeset 9512:05b8a812b487
Remove dead IsNull nodes in Guard lowering phase
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Thu, 02 May 2013 14:37:27 +0200 |
parents | 715f82d1f695 |
children | 3bb1834202f7 c45c0bda3602 |
files | graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java Thu May 02 14:35:48 2013 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java Thu May 02 14:37:27 2013 +0200 @@ -193,6 +193,9 @@ IsNullNode isNull = (IsNullNode) guard.condition(); NullCheckNode nullCheck = guard.graph().add(new NullCheckNode(isNull.object())); replaceCurrent(nullCheck); + if (isNull.usages().isEmpty()) { + isNull.safeDelete(); + } } private void insertLoopExits(DeoptimizeNode deopt) {