changeset 55559:38c73e24fa7b

8225475: Node budget asserts on x86_32/64 Summary: Make the (ad-hoc) loop cloning size estimate more pessimistic. Reviewed-by: shade
author phedlin
date Tue, 25 Jun 2019 11:43:36 +0200
parents 5c8eb7381088
children cb0131439e9d
files src/hotspot/share/opto/loopnode.cpp
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/opto/loopnode.cpp	Fri Jun 28 13:16:11 2019 +0200
+++ b/src/hotspot/share/opto/loopnode.cpp	Tue Jun 25 11:43:36 2019 +0200
@@ -2494,9 +2494,11 @@
       }
     }
   }
-  // Add data (x1.5) and control (x1.0) count to estimate iff both are > 0.
+  // Add data and control count (x2.0) to estimate iff both are > 0. This is
+  // a rather pessimistic estimate for the most part, in particular for some
+  // complex loops, but still not enough to capture all loops.
   if (ctrl_edge_out_cnt > 0 && data_edge_out_cnt > 0) {
-    estimate += ctrl_edge_out_cnt + data_edge_out_cnt + data_edge_out_cnt / 2;
+    estimate += 2 * (ctrl_edge_out_cnt + data_edge_out_cnt);
   }
 
   return estimate;