8191950: assertion failed: no insertions allowed
authorroland
Sat, 02 Dec 2017 13:50:04 +0100
changeset 48298 40b9faefb496
parent 48297 48ff95f16a16
child 48299 e8f5fc8f5f67
8191950: assertion failed: no insertions allowed Summary: Check for dead loops before incremental inlining. Reviewed-by: thartmann
src/hotspot/share/opto/callGenerator.cpp
--- a/src/hotspot/share/opto/callGenerator.cpp	Sat Dec 02 06:51:10 2017 +0100
+++ b/src/hotspot/share/opto/callGenerator.cpp	Sat Dec 02 13:50:04 2017 +0100
@@ -362,6 +362,20 @@
     return;
   }
 
+  // check for unreachable loop
+  CallProjections callprojs;
+  call->extract_projections(&callprojs, true);
+  if (callprojs.fallthrough_catchproj == call->in(0) ||
+      callprojs.catchall_catchproj == call->in(0) ||
+      callprojs.fallthrough_memproj == call->in(TypeFunc::Memory) ||
+      callprojs.catchall_memproj == call->in(TypeFunc::Memory) ||
+      callprojs.fallthrough_ioproj == call->in(TypeFunc::I_O) ||
+      callprojs.catchall_ioproj == call->in(TypeFunc::I_O) ||
+      (callprojs.resproj != NULL && call->find_edge(callprojs.resproj) != -1) ||
+      (callprojs.exobj != NULL && call->find_edge(callprojs.exobj) != -1)) {
+    return;
+  }
+
   Compile* C = Compile::current();
   // Remove inlined methods from Compiler's lists.
   if (call->is_macro()) {