< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopBeginNode.java

Print this page

        

@@ -51,10 +51,11 @@
     protected int unswitches;
     protected int splits;
     protected int inversionCount;
     protected LoopType loopType;
     protected int unrollFactor;
+    protected boolean osrLoop;
 
     public enum LoopType {
         SIMPLE_LOOP,
         PRE_LOOP,
         MAIN_LOOP,

@@ -301,30 +302,20 @@
 
     public boolean isLoopExit(AbstractBeginNode begin) {
         return begin instanceof LoopExitNode && ((LoopExitNode) begin).loopBegin() == this;
     }
 
-    public LoopExitNode getSingleLoopExit() {
-        assert loopExits().count() == 1;
-        return loopExits().first();
-    }
-
     public LoopEndNode getSingleLoopEnd() {
         assert loopEnds().count() == 1;
         return loopEnds().first();
     }
 
     @SuppressWarnings("try")
     public void removeExits() {
         for (LoopExitNode loopexit : loopExits().snapshot()) {
             try (DebugCloseable position = graph().withNodeSourcePosition(loopexit)) {
-                loopexit.removeProxies();
-                FrameState loopStateAfter = loopexit.stateAfter();
-                graph().replaceFixedWithFixed(loopexit, graph().add(new BeginNode()));
-                if (loopStateAfter != null) {
-                    GraphUtil.tryKillUnused(loopStateAfter);
-                }
+                loopexit.removeExit();
             }
         }
     }
 
     public GuardingNode getOverflowGuard() {

@@ -413,6 +404,14 @@
                     }
                 }
             }
         }
     }
+
+    public void markOsrLoop() {
+        osrLoop = true;
+    }
+
+    public boolean isOsrLoop() {
+        return osrLoop;
+    }
 }
< prev index next >