8191950: assertion failed: no insertions allowed
authorroland
Sat, 02 Dec 2017 13:50:04 +0100
changeset 48197 afcefb8ab1e1
parent 48196 5ee29f4ec472
child 48198 bf64ff40f4eb
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()) {