Skip to content

Commit e6aca1f

Browse files
committed
[GR-66619] Set cfg loops to null after invalidation.
PullRequest: graal/21274
2 parents 273ff1f + 75729e0 commit e6aca1f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/MemoryScheduleTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ private ScheduleResult getFinalSchedule(final String snippet, final TestMode mod
715715
if (graph.hasLoops() && graph.isLastCFGValid()) {
716716
// CFGLoops are computed differently after FSA, see CFGLoop#getLoopExits(). The
717717
// cached cfg needs to have its loop information invalidated.
718-
graph.getLastCFG().invalidateLoopInformation();
718+
graph.getLastCFG().resetLoopInformation();
719719
}
720720
}
721721
debug.dump(DebugContext.BASIC_LEVEL, graph, "after removal of framestates");

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/nodes/cfg/ControlFlowGraph.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,7 @@ public void invalidateFrequencies() {
12551255
}
12561256
}
12571257

1258-
public void invalidateLoopInformation() {
1258+
public void resetLoopInformation() {
12591259
if (buildConfig.loopsComputed) {
12601260
buildConfig.loopsComputed = false;
12611261
/*
@@ -1265,6 +1265,7 @@ public void invalidateLoopInformation() {
12651265
for (HIRBlock b : getBlocks()) {
12661266
b.loop = null;
12671267
}
1268+
loops = null;
12681269
}
12691270
}
12701271

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/phases/common/FrameStateAssignmentPhase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ protected void run(StructuredGraph graph) {
148148
GraphUtil.killAllWithUnusedFloatingInputs(graph.getNodes(FrameState.TYPE).filter(state -> state.hasNoUsages()), false);
149149
if (graph.hasLoops() && graph.isLastCFGValid()) {
150150
// CFGLoops are computed differently after FSA, see CFGLoop#getLoopExits().
151-
graph.getLastCFG().invalidateLoopInformation();
151+
graph.getLastCFG().resetLoopInformation();
152152
}
153153
}
154154

0 commit comments

Comments
 (0)