src/share/vm/opto/node.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8048879 Sdiff src/share/vm/opto

src/share/vm/opto/node.cpp

Print this page




1066 // The Right Thing with def-use info.
1067 //
1068 // You cannot bury the 'this' Node inside of a graph reshape.  If the reshaped
1069 // graph uses the 'this' Node it must be the root.  If you want a Node with
1070 // the same Opcode as the 'this' pointer use 'clone'.
1071 //
1072 Node *Node::Ideal(PhaseGVN *phase, bool can_reshape) {
1073   return NULL;                  // Default to being Ideal already
1074 }
1075 
1076 // Some nodes have specific Ideal subgraph transformations only if they are
1077 // unique users of specific nodes. Such nodes should be put on IGVN worklist
1078 // for the transformations to happen.
1079 bool Node::has_special_unique_user() const {
1080   assert(outcnt() == 1, "match only for unique out");
1081   Node* n = unique_out();
1082   int op  = Opcode();
1083   if( this->is_Store() ) {
1084     // Condition for back-to-back stores folding.
1085     return n->Opcode() == op && n->in(MemNode::Memory) == this;



1086   } else if( op == Op_AddL ) {
1087     // Condition for convL2I(addL(x,y)) ==> addI(convL2I(x),convL2I(y))
1088     return n->Opcode() == Op_ConvL2I && n->in(1) == this;
1089   } else if( op == Op_SubI || op == Op_SubL ) {
1090     // Condition for subI(x,subI(y,z)) ==> subI(addI(x,z),y)
1091     return n->Opcode() == op && n->in(2) == this;
1092   }
1093   return false;
1094 };
1095 
1096 //--------------------------find_exact_control---------------------------------
1097 // Skip Proj and CatchProj nodes chains. Check for Null and Top.
1098 Node* Node::find_exact_control(Node* ctrl) {
1099   if (ctrl == NULL && this->is_Region())
1100     ctrl = this->as_Region()->is_copy();
1101 
1102   if (ctrl != NULL && ctrl->is_CatchProj()) {
1103     if (ctrl->as_CatchProj()->_con == CatchProjNode::fall_through_index)
1104       ctrl = ctrl->in(0);
1105     if (ctrl != NULL && !ctrl->is_top())




1066 // The Right Thing with def-use info.
1067 //
1068 // You cannot bury the 'this' Node inside of a graph reshape.  If the reshaped
1069 // graph uses the 'this' Node it must be the root.  If you want a Node with
1070 // the same Opcode as the 'this' pointer use 'clone'.
1071 //
1072 Node *Node::Ideal(PhaseGVN *phase, bool can_reshape) {
1073   return NULL;                  // Default to being Ideal already
1074 }
1075 
1076 // Some nodes have specific Ideal subgraph transformations only if they are
1077 // unique users of specific nodes. Such nodes should be put on IGVN worklist
1078 // for the transformations to happen.
1079 bool Node::has_special_unique_user() const {
1080   assert(outcnt() == 1, "match only for unique out");
1081   Node* n = unique_out();
1082   int op  = Opcode();
1083   if( this->is_Store() ) {
1084     // Condition for back-to-back stores folding.
1085     return n->Opcode() == op && n->in(MemNode::Memory) == this;
1086   } else if (this->is_Load()) {
1087     // Condition for removing an unused LoadNode from the MemBarAcquire precedence input
1088     return n->Opcode() == Op_MemBarAcquire;
1089   } else if( op == Op_AddL ) {
1090     // Condition for convL2I(addL(x,y)) ==> addI(convL2I(x),convL2I(y))
1091     return n->Opcode() == Op_ConvL2I && n->in(1) == this;
1092   } else if( op == Op_SubI || op == Op_SubL ) {
1093     // Condition for subI(x,subI(y,z)) ==> subI(addI(x,z),y)
1094     return n->Opcode() == op && n->in(2) == this;
1095   }
1096   return false;
1097 };
1098 
1099 //--------------------------find_exact_control---------------------------------
1100 // Skip Proj and CatchProj nodes chains. Check for Null and Top.
1101 Node* Node::find_exact_control(Node* ctrl) {
1102   if (ctrl == NULL && this->is_Region())
1103     ctrl = this->as_Region()->is_copy();
1104 
1105   if (ctrl != NULL && ctrl->is_CatchProj()) {
1106     if (ctrl->as_CatchProj()->_con == CatchProjNode::fall_through_index)
1107       ctrl = ctrl->in(0);
1108     if (ctrl != NULL && !ctrl->is_top())


src/share/vm/opto/node.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File