Skip to content
Permalink
Browse files
8254734: "dead loop detected" assert failure with patch from 8223051
Reviewed-by: chagedorn, kvn
  • Loading branch information
rwestrel committed Oct 15, 2020
1 parent 7f73474 commit f44fc6defc97629f356b4ad10c0edb21afd27b81
Showing 2 changed files with 24 additions and 5 deletions.
@@ -2420,6 +2420,29 @@ void Node::ensure_control_or_add_prec(Node* c) {
}
}

bool Node::is_dead_loop_safe() const {
if (is_Phi()) {
return true;
}
if (is_Proj() && in(0) == NULL) {
return true;
}
if ((_flags & (Flag_is_dead_loop_safe | Flag_is_Con)) != 0) {
if (!is_Proj()) {
return true;
}
if (in(0)->is_Allocate()) {
return false;
}
// MemNode::can_see_stored_value() peeks through the boxing call
if (in(0)->is_CallStaticJava() && in(0)->as_CallStaticJava()->is_boxing_method()) {
return false;
}
return true;
}
return false;
}

//=============================================================================
//------------------------------yank-------------------------------------------
// Find and remove
@@ -905,11 +905,7 @@ class Node {

bool is_Con () const { return (_flags & Flag_is_Con) != 0; }
// The data node which is safe to leave in dead loop during IGVN optimization.
bool is_dead_loop_safe() const {
return is_Phi() || (is_Proj() && in(0) == NULL) ||
((_flags & (Flag_is_dead_loop_safe | Flag_is_Con)) != 0 &&
(!is_Proj() || !in(0)->is_Allocate()));
}
bool is_dead_loop_safe() const;

// is_Copy() returns copied edge index (0 or 1)
uint is_Copy() const { return (_flags & Flag_is_Copy); }

1 comment on commit f44fc6d

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on f44fc6d Oct 15, 2020

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.