Skip to content

Commit f44fc6d

Browse files
committed
8254734: "dead loop detected" assert failure with patch from 8223051
Reviewed-by: chagedorn, kvn
1 parent 7f73474 commit f44fc6d

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

src/hotspot/share/opto/node.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2420,6 +2420,29 @@ void Node::ensure_control_or_add_prec(Node* c) {
24202420
}
24212421
}
24222422

2423+
bool Node::is_dead_loop_safe() const {
2424+
if (is_Phi()) {
2425+
return true;
2426+
}
2427+
if (is_Proj() && in(0) == NULL) {
2428+
return true;
2429+
}
2430+
if ((_flags & (Flag_is_dead_loop_safe | Flag_is_Con)) != 0) {
2431+
if (!is_Proj()) {
2432+
return true;
2433+
}
2434+
if (in(0)->is_Allocate()) {
2435+
return false;
2436+
}
2437+
// MemNode::can_see_stored_value() peeks through the boxing call
2438+
if (in(0)->is_CallStaticJava() && in(0)->as_CallStaticJava()->is_boxing_method()) {
2439+
return false;
2440+
}
2441+
return true;
2442+
}
2443+
return false;
2444+
}
2445+
24232446
//=============================================================================
24242447
//------------------------------yank-------------------------------------------
24252448
// Find and remove

src/hotspot/share/opto/node.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -905,11 +905,7 @@ class Node {
905905

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

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

0 commit comments

Comments
 (0)