8191950: assertion failed: no insertions allowed
Summary: Check for dead loops before incremental inlining.
Reviewed-by: thartmann
--- 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()) {