1418 return this; // made change 1419 } 1420 } 1421 } 1422 } 1423 if (base_is_phi) { 1424 if (!stable_phi(base->as_Phi(), phase)) { 1425 return NULL; // Wait stable graph 1426 } 1427 uint cnt = base->req(); 1428 // Check for loop invariant memory. 1429 if (cnt == 3) { 1430 for (uint i = 1; i < cnt; i++) { 1431 if (base->in(i) == base) { 1432 return NULL; // Wait stable graph 1433 } 1434 } 1435 } 1436 } 1437 1438 bool load_boxed_phi = load_boxed_values && base_is_phi && (base->in(0) == mem->in(0)); 1439 1440 // Split through Phi (see original code in loopopts.cpp). 1441 assert(C->have_alias_type(t_oop), "instance should have alias type"); 1442 1443 // Do nothing here if Identity will find a value 1444 // (to avoid infinite chain of value phis generation). 1445 if (!phase->eqv(this, phase->apply_identity(this))) 1446 return NULL; 1447 1448 // Select Region to split through. 1449 Node* region; 1450 if (!base_is_phi) { 1451 assert(mem->is_Phi(), "sanity"); 1452 region = mem->in(0); 1453 // Skip if the region dominates some control edge of the address. 1454 if (!MemNode::all_controls_dominate(address, region)) 1455 return NULL; 1456 } else if (!mem->is_Phi()) { 1457 assert(base_is_phi, "sanity"); 1458 region = base->in(0); 1459 // Skip if the region dominates some control edge of the memory. | 1418 return this; // made change 1419 } 1420 } 1421 } 1422 } 1423 if (base_is_phi) { 1424 if (!stable_phi(base->as_Phi(), phase)) { 1425 return NULL; // Wait stable graph 1426 } 1427 uint cnt = base->req(); 1428 // Check for loop invariant memory. 1429 if (cnt == 3) { 1430 for (uint i = 1; i < cnt; i++) { 1431 if (base->in(i) == base) { 1432 return NULL; // Wait stable graph 1433 } 1434 } 1435 } 1436 } 1437 1438 // Split through Phi (see original code in loopopts.cpp). 1439 assert(C->have_alias_type(t_oop), "instance should have alias type"); 1440 1441 // Do nothing here if Identity will find a value 1442 // (to avoid infinite chain of value phis generation). 1443 if (!phase->eqv(this, phase->apply_identity(this))) 1444 return NULL; 1445 1446 // Select Region to split through. 1447 Node* region; 1448 if (!base_is_phi) { 1449 assert(mem->is_Phi(), "sanity"); 1450 region = mem->in(0); 1451 // Skip if the region dominates some control edge of the address. 1452 if (!MemNode::all_controls_dominate(address, region)) 1453 return NULL; 1454 } else if (!mem->is_Phi()) { 1455 assert(base_is_phi, "sanity"); 1456 region = base->in(0); 1457 // Skip if the region dominates some control edge of the memory. |