38 #include "opto/subnode.hpp" 39 40 //============================================================================= 41 //------------------------------split_thru_phi--------------------------------- 42 // Split Node 'n' through merge point if there is enough win. 43 Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) { 44 if (n->Opcode() == Op_ConvI2L && n->bottom_type() != TypeLong::LONG) { 45 // ConvI2L may have type information on it which is unsafe to push up 46 // so disable this for now 47 return NULL; 48 } 49 50 // Splitting range check CastIIs through a loop induction Phi can 51 // cause new Phis to be created that are left unrelated to the loop 52 // induction Phi and prevent optimizations (vectorization) 53 if (n->Opcode() == Op_CastII && n->as_CastII()->has_range_check() && 54 region->is_CountedLoop() && n->in(1) == region->as_CountedLoop()->phi()) { 55 return NULL; 56 } 57 58 int wins = 0; 59 assert(!n->is_CFG(), ""); 60 assert(region->is_Region(), ""); 61 62 const Type* type = n->bottom_type(); 63 const TypeOopPtr *t_oop = _igvn.type(n)->isa_oopptr(); 64 Node *phi; 65 if (t_oop != NULL && t_oop->is_known_instance_field()) { 66 int iid = t_oop->instance_id(); 67 int index = C->get_alias_index(t_oop); 68 int offset = t_oop->offset(); 69 phi = new PhiNode(region, type, NULL, iid, index, offset); 70 } else { 71 phi = PhiNode::make_blank(region, n); 72 } 73 uint old_unique = C->unique(); 74 for (uint i = 1; i < region->req(); i++) { 75 Node *x; 76 Node* the_clone = NULL; 77 if (region->in(i) == C->top()) { | 38 #include "opto/subnode.hpp" 39 40 //============================================================================= 41 //------------------------------split_thru_phi--------------------------------- 42 // Split Node 'n' through merge point if there is enough win. 43 Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) { 44 if (n->Opcode() == Op_ConvI2L && n->bottom_type() != TypeLong::LONG) { 45 // ConvI2L may have type information on it which is unsafe to push up 46 // so disable this for now 47 return NULL; 48 } 49 50 // Splitting range check CastIIs through a loop induction Phi can 51 // cause new Phis to be created that are left unrelated to the loop 52 // induction Phi and prevent optimizations (vectorization) 53 if (n->Opcode() == Op_CastII && n->as_CastII()->has_range_check() && 54 region->is_CountedLoop() && n->in(1) == region->as_CountedLoop()->phi()) { 55 return NULL; 56 } 57 58 // Value types should not be split through Phis because they cannot be merged 59 // through Phi nodes but each value input needs to be merged individually. 60 if (n->is_ValueType()) { 61 return NULL; 62 } 63 64 int wins = 0; 65 assert(!n->is_CFG(), ""); 66 assert(region->is_Region(), ""); 67 68 const Type* type = n->bottom_type(); 69 const TypeOopPtr *t_oop = _igvn.type(n)->isa_oopptr(); 70 Node *phi; 71 if (t_oop != NULL && t_oop->is_known_instance_field()) { 72 int iid = t_oop->instance_id(); 73 int index = C->get_alias_index(t_oop); 74 int offset = t_oop->offset(); 75 phi = new PhiNode(region, type, NULL, iid, index, offset); 76 } else { 77 phi = PhiNode::make_blank(region, n); 78 } 79 uint old_unique = C->unique(); 80 for (uint i = 1; i < region->req(); i++) { 81 Node *x; 82 Node* the_clone = NULL; 83 if (region->in(i) == C->top()) { |