Mercurial > hg > truffle
changeset 5049:7770a465fb73
Merge
author | Christian Haeubl <christian.haeubl@oracle.com> |
---|---|
date | Wed, 07 Mar 2012 11:29:04 -0800 |
parents | 63869930666f (current diff) 2eb3c0920cf1 (diff) |
children | 9f4224ae490f |
files | graal/com.oracle.max.graal.java/src/com/oracle/max/graal/java/GraphBuilderPhase.java |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.java/src/com/oracle/max/graal/java/GraphBuilderPhase.java Wed Mar 07 11:14:00 2012 -0800 +++ b/graal/com.oracle.max.graal.java/src/com/oracle/max/graal/java/GraphBuilderPhase.java Wed Mar 07 11:29:04 2012 -0800 @@ -1260,14 +1260,12 @@ */ private BeginNode createBlockTarget(double probability, Block block, FrameStateBuilder stateAfter) { assert probability >= 0 && probability <= 1; - if (probability == 0) { - FrameStateBuilder state = stateAfter.copy(); - state.clearNonLiveLocals(block.localsLiveIn); - + if (probability == 0 && config.useBranchPrediction()) { BeginNode begin = currentGraph.add(new BeginNode()); DeoptimizeNode deopt = currentGraph.add(new DeoptimizeNode(DeoptAction.InvalidateReprofile)); begin.setNext(deopt); - begin.setStateAfter(state.create(block.startBci)); + // Note: We are not allowed to set the stateAfter of the begin node, because we have to deoptimize to + // a bci _before_ the actual if, so that the interpreter can update the profiling information. return begin; }