< 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,60 ****
--- 51,61 ----
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,330 ****
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);
! }
}
}
}
public GuardingNode getOverflowGuard() {
--- 302,321 ----
public boolean isLoopExit(AbstractBeginNode begin) {
return begin instanceof LoopExitNode && ((LoopExitNode) begin).loopBegin() == this;
}
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.removeExit();
}
}
}
public GuardingNode getOverflowGuard() {
*** 413,418 ****
--- 404,417 ----
}
}
}
}
}
+
+ public void markOsrLoop() {
+ osrLoop = true;
+ }
+
+ public boolean isOsrLoop() {
+ return osrLoop;
+ }
}
< prev index next >