equal
deleted
inserted
replaced
878 if (is_ConstraintCast() || is_CheckCastPP()) |
878 if (is_ConstraintCast() || is_CheckCastPP()) |
879 return uncast_helper(this); |
879 return uncast_helper(this); |
880 else |
880 else |
881 return (Node*) this; |
881 return (Node*) this; |
882 } |
882 } |
|
883 |
|
884 // Find out of current node that matches opcode. |
|
885 Node* Node::find_out_with(int opcode) { |
|
886 for (DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++) { |
|
887 Node* use = fast_out(i); |
|
888 if (use->Opcode() == opcode) { |
|
889 return use; |
|
890 } |
|
891 } |
|
892 return NULL; |
|
893 } |
|
894 |
|
895 // Return true if the current node has an out that matches opcode. |
|
896 bool Node::has_out_with(int opcode) { |
|
897 return (find_out_with(opcode) != NULL); |
|
898 } |
|
899 |
|
900 // Return true if the current node has an out that matches any of the opcodes. |
|
901 bool Node::has_out_with(int opcode1, int opcode2, int opcode3, int opcode4) { |
|
902 for (DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++) { |
|
903 int opcode = fast_out(i)->Opcode(); |
|
904 if (opcode == opcode1 || opcode == opcode2 || opcode == opcode3 || opcode == opcode4) { |
|
905 return true; |
|
906 } |
|
907 } |
|
908 return false; |
|
909 } |
|
910 |
883 |
911 |
884 //---------------------------uncast_helper------------------------------------- |
912 //---------------------------uncast_helper------------------------------------- |
885 Node* Node::uncast_helper(const Node* p) { |
913 Node* Node::uncast_helper(const Node* p) { |
886 #ifdef ASSERT |
914 #ifdef ASSERT |
887 uint depth_count = 0; |
915 uint depth_count = 0; |