Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8254734: "dead loop detected" assert failure with patch from 8223051 #649

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/hotspot/share/opto/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions src/hotspot/share/opto/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,11 +896,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); }
Expand Down