Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8260653: Unreachable nodes keep speculative types alive
Reviewed-by: vlivanov, thartmann
  • Loading branch information
Nils Eliasson committed Feb 18, 2021
1 parent b695c7e commit 3a21e1d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/hotspot/share/opto/phaseX.cpp
Expand Up @@ -330,10 +330,15 @@ void NodeHash::remove_useless_nodes(VectorSet &useful) {
void NodeHash::check_no_speculative_types() {
#ifdef ASSERT
uint max = size();
Unique_Node_List live_nodes;
Compile::current()->identify_useful_nodes(live_nodes);
Node *sentinel_node = sentinel();
for (uint i = 0; i < max; ++i) {
Node *n = at(i);
if(n != NULL && n != sentinel_node && n->is_Type() && n->outcnt() > 0) {
if (n != NULL &&
n != sentinel_node &&
n->is_Type() &&
live_nodes.member(n)) {
TypeNode* tn = n->as_Type();
const Type* t = tn->type();
const Type* t_no_spec = t->remove_speculative();
Expand Down

1 comment on commit 3a21e1d

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.