729 // Return the new memory. 730 static Node* clear_memory(Node* control, Node* mem, Node* dest, 731 intptr_t start_offset, 732 intptr_t end_offset, 733 PhaseGVN* phase); 734 static Node* clear_memory(Node* control, Node* mem, Node* dest, 735 intptr_t start_offset, 736 Node* end_offset, 737 PhaseGVN* phase); 738 static Node* clear_memory(Node* control, Node* mem, Node* dest, 739 Node* start_offset, 740 Node* end_offset, 741 PhaseGVN* phase); 742 }; 743 744 //------------------------------StrComp------------------------------------- 745 class StrCompNode: public Node { 746 public: 747 StrCompNode(Node *control, 748 Node* char_array_mem, 749 Node* value_mem, 750 Node* count_mem, 751 Node* offset_mem, 752 Node* s1, Node* s2): Node(control, 753 char_array_mem, 754 value_mem, 755 count_mem, 756 offset_mem, 757 s1, s2) {}; 758 virtual int Opcode() const; 759 virtual bool depends_only_on_test() const { return false; } 760 virtual const Type* bottom_type() const { return TypeInt::INT; } 761 // a StrCompNode (conservatively) aliases with everything: 762 virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; } 763 virtual uint match_edge(uint idx) const; 764 virtual uint ideal_reg() const { return Op_RegI; } 765 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); 766 }; 767 768 //------------------------------StrEquals------------------------------------- 769 class StrEqualsNode: public Node { 770 public: 771 StrEqualsNode(Node *control, 772 Node* char_array_mem, 773 Node* value_mem, 774 Node* count_mem, 775 Node* offset_mem, 776 Node* s1, Node* s2): Node(control, 777 char_array_mem, 778 value_mem, 779 count_mem, 780 offset_mem, 781 s1, s2) {}; 782 virtual int Opcode() const; 783 virtual bool depends_only_on_test() const { return false; } 784 virtual const Type* bottom_type() const { return TypeInt::BOOL; } 785 // a StrEqualsNode (conservatively) aliases with everything: 786 virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; } 787 virtual uint match_edge(uint idx) const; 788 virtual uint ideal_reg() const { return Op_RegI; } 789 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); 790 }; 791 792 //------------------------------StrIndexOf------------------------------------- 793 class StrIndexOfNode: public Node { 794 public: 795 StrIndexOfNode(Node *control, 796 Node* char_array_mem, 797 Node* value_mem, 798 Node* count_mem, 799 Node* offset_mem, 800 Node* s1, Node* s2): Node(control, 801 char_array_mem, 802 value_mem, 803 count_mem, 804 offset_mem, 805 s1, s2) {}; 806 virtual int Opcode() const; 807 virtual bool depends_only_on_test() const { return false; } 808 virtual const Type* bottom_type() const { return TypeInt::INT; } 809 // a StrIndexOfNode (conservatively) aliases with everything: 810 virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; } 811 virtual uint match_edge(uint idx) const; 812 virtual uint ideal_reg() const { return Op_RegI; } 813 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); 814 }; 815 816 //------------------------------AryEq--------------------------------------- 817 class AryEqNode: public Node { 818 public: 819 AryEqNode(Node *control, Node* s1, Node* s2): Node(control, s1, s2) {}; 820 virtual int Opcode() const; 821 virtual bool depends_only_on_test() const { return false; } 822 virtual const Type* bottom_type() const { return TypeInt::BOOL; } 823 virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; } 824 virtual uint ideal_reg() const { return Op_RegI; } 825 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | 729 // Return the new memory. 730 static Node* clear_memory(Node* control, Node* mem, Node* dest, 731 intptr_t start_offset, 732 intptr_t end_offset, 733 PhaseGVN* phase); 734 static Node* clear_memory(Node* control, Node* mem, Node* dest, 735 intptr_t start_offset, 736 Node* end_offset, 737 PhaseGVN* phase); 738 static Node* clear_memory(Node* control, Node* mem, Node* dest, 739 Node* start_offset, 740 Node* end_offset, 741 PhaseGVN* phase); 742 }; 743 744 //------------------------------StrComp------------------------------------- 745 class StrCompNode: public Node { 746 public: 747 StrCompNode(Node *control, 748 Node* char_array_mem, 749 Node* s1, Node* s2, 750 Node* c1, Node* c2): Node(control, 751 char_array_mem, 752 s1, s2, 753 c1, c2) {}; 754 virtual int Opcode() const; 755 virtual bool depends_only_on_test() const { return false; } 756 virtual const Type* bottom_type() const { return TypeInt::INT; } 757 // a StrCompNode (conservatively) aliases with everything: 758 virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; } 759 virtual uint match_edge(uint idx) const; 760 virtual uint ideal_reg() const { return Op_RegI; } 761 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); 762 }; 763 764 //------------------------------StrEquals------------------------------------- 765 class StrEqualsNode: public Node { 766 public: 767 StrEqualsNode(Node *control, 768 Node* char_array_mem, 769 Node* s1, Node* s2, Node* c): Node(control, 770 char_array_mem, 771 s1, s2, c) {}; 772 virtual int Opcode() const; 773 virtual bool depends_only_on_test() const { return false; } 774 virtual const Type* bottom_type() const { return TypeInt::BOOL; } 775 // a StrEqualsNode (conservatively) aliases with everything: 776 virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; } 777 virtual uint match_edge(uint idx) const; 778 virtual uint ideal_reg() const { return Op_RegI; } 779 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); 780 }; 781 782 //------------------------------StrIndexOf------------------------------------- 783 class StrIndexOfNode: public Node { 784 public: 785 StrIndexOfNode(Node *control, 786 Node* char_array_mem, 787 Node* s1, Node* s2, 788 Node* c1, Node* c2): Node(control, 789 char_array_mem, 790 s1, s2, 791 c1, c2) {}; 792 virtual int Opcode() const; 793 virtual bool depends_only_on_test() const { return false; } 794 virtual const Type* bottom_type() const { return TypeInt::INT; } 795 // a StrIndexOfNode (conservatively) aliases with everything: 796 virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; } 797 virtual uint match_edge(uint idx) const; 798 virtual uint ideal_reg() const { return Op_RegI; } 799 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); 800 }; 801 802 //------------------------------AryEq--------------------------------------- 803 class AryEqNode: public Node { 804 public: 805 AryEqNode(Node *control, Node* s1, Node* s2): Node(control, s1, s2) {}; 806 virtual int Opcode() const; 807 virtual bool depends_only_on_test() const { return false; } 808 virtual const Type* bottom_type() const { return TypeInt::BOOL; } 809 virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; } 810 virtual uint ideal_reg() const { return Op_RegI; } 811 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |