Skip to content

Commit f3708bb

Browse files
committed
8225475: Node budget asserts on x86_32/64
Make the (ad-hoc) loop cloning size estimate more pessimistic. Backport-of: ca29203
1 parent 997c55f commit f3708bb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/hotspot/share/opto/loopnode.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2511,9 +2511,11 @@ uint IdealLoopTree::est_loop_clone_sz(uint factor) const {
25112511
}
25122512
}
25132513
}
2514-
// Add data (x1.5) and control (x1.0) count to estimate iff both are > 0.
2514+
// Add data and control count (x2.0) to estimate iff both are > 0. This is
2515+
// a rather pessimistic estimate for the most part, in particular for some
2516+
// complex loops, but still not enough to capture all loops.
25152517
if (ctrl_edge_out_cnt > 0 && data_edge_out_cnt > 0) {
2516-
estimate += ctrl_edge_out_cnt + data_edge_out_cnt + data_edge_out_cnt / 2;
2518+
estimate += 2 * (ctrl_edge_out_cnt + data_edge_out_cnt);
25172519
}
25182520

25192521
return estimate;

0 commit comments

Comments
 (0)