Mercurial > hg > graal-compiler
changeset 23247:d455abbf413d
Do not peel loops with loop exits that unwind.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sat, 02 Jan 2016 13:26:48 +0100 |
parents | 9f6dc0676de2 |
children | 810f72a1c5f3 |
files | graal/com.oracle.graal.loop/src/com/oracle/graal/loop/DefaultLoopPolicies.java |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/DefaultLoopPolicies.java Sat Jan 02 12:46:21 2016 +0100 +++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/DefaultLoopPolicies.java Sat Jan 02 13:26:48 2016 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,11 +28,14 @@ import java.util.List; +import jdk.vm.ci.code.BytecodeFrame; + import com.oracle.graal.debug.Debug; import com.oracle.graal.debug.DebugMetric; import com.oracle.graal.graph.Node; import com.oracle.graal.nodes.AbstractBeginNode; import com.oracle.graal.nodes.ControlSplitNode; +import com.oracle.graal.nodes.FrameState; import com.oracle.graal.nodes.LoopBeginNode; import com.oracle.graal.nodes.MergeNode; import com.oracle.graal.nodes.VirtualState; @@ -67,6 +70,12 @@ if (node instanceof ControlFlowAnchorNode) { return false; } + if (node instanceof FrameState) { + FrameState frameState = (FrameState) node; + if (frameState.bci == BytecodeFrame.AFTER_EXCEPTION_BCI || frameState.bci == BytecodeFrame.UNWIND_BCI) { + return false; + } + } } return true; } else {