Mercurial > hg > openjdk > jdk8u > hotspot
changeset 9429:ea21223a1e4a
8217230: assert(t == t_no_spec) failure in NodeHash::check_no_speculative_types()
Summary: Remove dead node from C2 IR.
Reviewed-by: roland, neliasso
author | thartmann |
---|---|
date | Wed, 25 Mar 2020 16:33:55 +0100 |
parents | 32086319a1c6 |
children | af24dfd69254 |
files | src/share/vm/opto/compile.cpp src/share/vm/opto/compile.hpp |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/opto/compile.cpp Thu Apr 01 11:29:57 2021 +0800 +++ b/src/share/vm/opto/compile.cpp Wed Mar 25 16:33:55 2020 +0100 @@ -2084,13 +2084,16 @@ // They were inserted during parsing (see add_safepoint()) to make // infinite loops without calls or exceptions visible to root, i.e., // useful. -void Compile::remove_root_to_sfpts_edges() { +void Compile::remove_root_to_sfpts_edges(PhaseIterGVN& igvn) { Node *r = root(); if (r != NULL) { for (uint i = r->req(); i < r->len(); ++i) { Node *n = r->in(i); if (n != NULL && n->is_SafePoint()) { r->rm_prec(i); + if (n->outcnt() == 0) { + igvn.remove_dead_node(n); + } --i; } } @@ -2154,7 +2157,7 @@ // Now that all inlining is over, cut edge from root to loop // safepoints - remove_root_to_sfpts_edges(); + remove_root_to_sfpts_edges(igvn); // Remove the speculative part of types and clean up the graph from // the extra CastPP nodes whose only purpose is to carry them. Do
--- a/src/share/vm/opto/compile.hpp Thu Apr 01 11:29:57 2021 +0800 +++ b/src/share/vm/opto/compile.hpp Wed Mar 25 16:33:55 2020 +0100 @@ -959,7 +959,7 @@ void inline_incrementally(PhaseIterGVN& igvn); void inline_string_calls(bool parse_time); void inline_boxing_calls(PhaseIterGVN& igvn); - void remove_root_to_sfpts_edges(); + void remove_root_to_sfpts_edges(PhaseIterGVN& igvn); // Matching, CFG layout, allocation, code generation PhaseCFG* cfg() { return _cfg; }