Mercurial > hg > graal-compiler
changeset 6552:3cd6c6743a6a
Do not generate null check for values already proven to be non-null.
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Fri, 12 Oct 2012 16:10:05 -0700 |
parents | 4ecd2f236bd8 |
children | 85724a16e4c2 |
files | graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Fri Oct 12 16:09:36 2012 -0700 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Fri Oct 12 16:10:05 2012 -0700 @@ -759,6 +759,9 @@ } private void emitNullCheck(ValueNode receiver) { + if (receiver.stamp().nonNull()) { + return; + } BlockPlaceholderNode trueSucc = currentGraph.add(new BlockPlaceholderNode()); BlockPlaceholderNode falseSucc = currentGraph.add(new BlockPlaceholderNode()); IfNode ifNode = currentGraph.add(new IfNode(currentGraph.unique(new IsNullNode(receiver)), trueSucc, falseSucc, 0.5, graphId));