1100 // The Right Thing with def-use info. 1101 // 1102 // You cannot bury the 'this' Node inside of a graph reshape. If the reshaped 1103 // graph uses the 'this' Node it must be the root. If you want a Node with 1104 // the same Opcode as the 'this' pointer use 'clone'. 1105 // 1106 Node *Node::Ideal(PhaseGVN *phase, bool can_reshape) { 1107 return NULL; // Default to being Ideal already 1108 } 1109 1110 // Some nodes have specific Ideal subgraph transformations only if they are 1111 // unique users of specific nodes. Such nodes should be put on IGVN worklist 1112 // for the transformations to happen. 1113 bool Node::has_special_unique_user() const { 1114 assert(outcnt() == 1, "match only for unique out"); 1115 Node* n = unique_out(); 1116 int op = Opcode(); 1117 if (this->is_Store()) { 1118 // Condition for back-to-back stores folding. 1119 return n->Opcode() == op && n->in(MemNode::Memory) == this; 1120 } else if (this->is_Load()) { 1121 // Condition for removing an unused LoadNode from the MemBarAcquire precedence input 1122 return n->Opcode() == Op_MemBarAcquire; 1123 } else if (op == Op_AddL) { 1124 // Condition for convL2I(addL(x,y)) ==> addI(convL2I(x),convL2I(y)) 1125 return n->Opcode() == Op_ConvL2I && n->in(1) == this; 1126 } else if (op == Op_SubI || op == Op_SubL) { 1127 // Condition for subI(x,subI(y,z)) ==> subI(addI(x,z),y) 1128 return n->Opcode() == op && n->in(2) == this; 1129 } else if (is_If() && (n->is_IfFalse() || n->is_IfTrue())) { 1130 // See IfProjNode::Identity() 1131 return true; 1132 } 1133 return false; 1134 }; 1135 1136 //--------------------------find_exact_control--------------------------------- 1137 // Skip Proj and CatchProj nodes chains. Check for Null and Top. 1138 Node* Node::find_exact_control(Node* ctrl) { 1139 if (ctrl == NULL && this->is_Region()) 1140 ctrl = this->as_Region()->is_copy(); 1141 | 1100 // The Right Thing with def-use info. 1101 // 1102 // You cannot bury the 'this' Node inside of a graph reshape. If the reshaped 1103 // graph uses the 'this' Node it must be the root. If you want a Node with 1104 // the same Opcode as the 'this' pointer use 'clone'. 1105 // 1106 Node *Node::Ideal(PhaseGVN *phase, bool can_reshape) { 1107 return NULL; // Default to being Ideal already 1108 } 1109 1110 // Some nodes have specific Ideal subgraph transformations only if they are 1111 // unique users of specific nodes. Such nodes should be put on IGVN worklist 1112 // for the transformations to happen. 1113 bool Node::has_special_unique_user() const { 1114 assert(outcnt() == 1, "match only for unique out"); 1115 Node* n = unique_out(); 1116 int op = Opcode(); 1117 if (this->is_Store()) { 1118 // Condition for back-to-back stores folding. 1119 return n->Opcode() == op && n->in(MemNode::Memory) == this; 1120 } else if (this->is_Load() || this->is_DecodeN()) { 1121 // Condition for removing an unused LoadNode or DecodeNNode from the MemBarAcquire precedence input 1122 return n->Opcode() == Op_MemBarAcquire; 1123 } else if (op == Op_AddL) { 1124 // Condition for convL2I(addL(x,y)) ==> addI(convL2I(x),convL2I(y)) 1125 return n->Opcode() == Op_ConvL2I && n->in(1) == this; 1126 } else if (op == Op_SubI || op == Op_SubL) { 1127 // Condition for subI(x,subI(y,z)) ==> subI(addI(x,z),y) 1128 return n->Opcode() == op && n->in(2) == this; 1129 } else if (is_If() && (n->is_IfFalse() || n->is_IfTrue())) { 1130 // See IfProjNode::Identity() 1131 return true; 1132 } 1133 return false; 1134 }; 1135 1136 //--------------------------find_exact_control--------------------------------- 1137 // Skip Proj and CatchProj nodes chains. Check for Null and Top. 1138 Node* Node::find_exact_control(Node* ctrl) { 1139 if (ctrl == NULL && this->is_Region()) 1140 ctrl = this->as_Region()->is_copy(); 1141 |