File tree Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -2420,6 +2420,29 @@ void Node::ensure_control_or_add_prec(Node* c) {
2420
2420
}
2421
2421
}
2422
2422
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
+
2423
2446
// =============================================================================
2424
2447
// ------------------------------yank-------------------------------------------
2425
2448
// Find and remove
Original file line number Diff line number Diff line change @@ -905,11 +905,7 @@ class Node {
905
905
906
906
bool is_Con () const { return (_flags & Flag_is_Con) != 0 ; }
907
907
// 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 ;
913
909
914
910
// is_Copy() returns copied edge index (0 or 1)
915
911
uint is_Copy () const { return (_flags & Flag_is_Copy); }
You can’t perform that action at this time.
0 commit comments