changeset 6680:10a3d06d58dc

fix for unnecessary BailoutExceptions in OSR
author Lukas Stadler <lukas.stadler@jku.at>
date Wed, 07 Nov 2012 15:59:11 +0100
parents 4f28522d9cfd
children 02983279d0e6
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java	Wed Nov 07 15:58:20 2012 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java	Wed Nov 07 15:59:11 2012 +0100
@@ -42,20 +42,22 @@
 
     @Override
     protected void run(StructuredGraph graph) {
+        if (graph.getEntryBCI() == StructuredGraph.INVOCATION_ENTRY_BCI) {
+            // This happens during inlining in a OSR method, because the same phase plan will be used.
+            return;
+        }
         Debug.dump(graph, "OnStackReplacement initial");
         EntryMarkerNode osr;
         do {
             NodeIterable<EntryMarkerNode> osrNodes = graph.getNodes(EntryMarkerNode.class);
             osr = osrNodes.first();
             if (osr == null) {
-                System.out.println("no OnStackReplacementNode generated");
                 throw new BailoutException("no OnStackReplacementNode generated");
             }
             if (osrNodes.count() > 1) {
                 throw new GraalInternalError("multiple OnStackReplacementNodes generated");
             }
             if (osr.stateAfter().locksSize() != 0) {
-                System.out.println("osr with locks not supported");
                 throw new BailoutException("osr with locks not supported");
             }
             if (osr.stateAfter().stackSize() != 0) {