Mercurial > hg > truffle
comparison src/share/vm/opto/memnode.hpp @ 986:62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
6875866: Intrinsic for String.indexOf() is broken on x86 with SSE4.2
Summary: Modify String intrinsic methods to pass char[] pointers instead of string oops.
Reviewed-by: never
author | kvn |
---|---|
date | Mon, 14 Sep 2009 12:14:20 -0700 |
parents | 685e959d09ea |
children | f96a1a986f7b |
comparison
equal
deleted
inserted
replaced
985:685e959d09ea | 986:62001a362ce9 |
---|---|
746 }; | 746 }; |
747 | 747 |
748 //------------------------------StrComp------------------------------------- | 748 //------------------------------StrComp------------------------------------- |
749 class StrCompNode: public Node { | 749 class StrCompNode: public Node { |
750 public: | 750 public: |
751 StrCompNode(Node *control, | 751 StrCompNode(Node* control, Node* char_array_mem, |
752 Node* char_array_mem, | 752 Node* s1, Node* c1, |
753 Node* value_mem, | 753 Node* s2, Node* c2): Node(control, char_array_mem, |
754 Node* count_mem, | 754 s1, c1, |
755 Node* offset_mem, | 755 s2, c2) {}; |
756 Node* s1, Node* s2): Node(control, | |
757 char_array_mem, | |
758 value_mem, | |
759 count_mem, | |
760 offset_mem, | |
761 s1, s2) {}; | |
762 virtual int Opcode() const; | 756 virtual int Opcode() const; |
763 virtual bool depends_only_on_test() const { return false; } | 757 virtual bool depends_only_on_test() const { return false; } |
764 virtual const Type* bottom_type() const { return TypeInt::INT; } | 758 virtual const Type* bottom_type() const { return TypeInt::INT; } |
765 // a StrCompNode (conservatively) aliases with everything: | 759 virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; } |
766 virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; } | |
767 virtual uint match_edge(uint idx) const; | 760 virtual uint match_edge(uint idx) const; |
768 virtual uint ideal_reg() const { return Op_RegI; } | 761 virtual uint ideal_reg() const { return Op_RegI; } |
769 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | 762 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
770 }; | 763 }; |
771 | 764 |
772 //------------------------------StrEquals------------------------------------- | 765 //------------------------------StrEquals------------------------------------- |
773 class StrEqualsNode: public Node { | 766 class StrEqualsNode: public Node { |
774 public: | 767 public: |
775 StrEqualsNode(Node *control, | 768 StrEqualsNode(Node* control, Node* char_array_mem, |
776 Node* char_array_mem, | 769 Node* s1, Node* s2, Node* c): Node(control, char_array_mem, |
777 Node* value_mem, | 770 s1, s2, c) {}; |
778 Node* count_mem, | |
779 Node* offset_mem, | |
780 Node* s1, Node* s2): Node(control, | |
781 char_array_mem, | |
782 value_mem, | |
783 count_mem, | |
784 offset_mem, | |
785 s1, s2) {}; | |
786 virtual int Opcode() const; | |
787 virtual bool depends_only_on_test() const { return false; } | |
788 virtual const Type* bottom_type() const { return TypeInt::BOOL; } | |
789 // a StrEqualsNode (conservatively) aliases with everything: | |
790 virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; } | |
791 virtual uint match_edge(uint idx) const; | |
792 virtual uint ideal_reg() const { return Op_RegI; } | |
793 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
794 }; | |
795 | |
796 //------------------------------StrIndexOf------------------------------------- | |
797 class StrIndexOfNode: public Node { | |
798 public: | |
799 StrIndexOfNode(Node *control, | |
800 Node* char_array_mem, | |
801 Node* value_mem, | |
802 Node* count_mem, | |
803 Node* offset_mem, | |
804 Node* s1, Node* s2): Node(control, | |
805 char_array_mem, | |
806 value_mem, | |
807 count_mem, | |
808 offset_mem, | |
809 s1, s2) {}; | |
810 virtual int Opcode() const; | |
811 virtual bool depends_only_on_test() const { return false; } | |
812 virtual const Type* bottom_type() const { return TypeInt::INT; } | |
813 // a StrIndexOfNode (conservatively) aliases with everything: | |
814 virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; } | |
815 virtual uint match_edge(uint idx) const; | |
816 virtual uint ideal_reg() const { return Op_RegI; } | |
817 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
818 }; | |
819 | |
820 //------------------------------AryEq--------------------------------------- | |
821 class AryEqNode: public Node { | |
822 public: | |
823 AryEqNode(Node *control, Node* s1, Node* s2): Node(control, s1, s2) {}; | |
824 virtual int Opcode() const; | 771 virtual int Opcode() const; |
825 virtual bool depends_only_on_test() const { return false; } | 772 virtual bool depends_only_on_test() const { return false; } |
826 virtual const Type* bottom_type() const { return TypeInt::BOOL; } | 773 virtual const Type* bottom_type() const { return TypeInt::BOOL; } |
827 virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; } | 774 virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; } |
775 virtual uint match_edge(uint idx) const; | |
776 virtual uint ideal_reg() const { return Op_RegI; } | |
777 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
778 }; | |
779 | |
780 //------------------------------StrIndexOf------------------------------------- | |
781 class StrIndexOfNode: public Node { | |
782 public: | |
783 StrIndexOfNode(Node* control, Node* char_array_mem, | |
784 Node* s1, Node* c1, | |
785 Node* s2, Node* c2): Node(control, char_array_mem, | |
786 s1, c1, | |
787 s2, c2) {}; | |
788 virtual int Opcode() const; | |
789 virtual bool depends_only_on_test() const { return false; } | |
790 virtual const Type* bottom_type() const { return TypeInt::INT; } | |
791 virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; } | |
792 virtual uint match_edge(uint idx) const; | |
793 virtual uint ideal_reg() const { return Op_RegI; } | |
794 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
795 }; | |
796 | |
797 //------------------------------AryEq--------------------------------------- | |
798 class AryEqNode: public Node { | |
799 public: | |
800 AryEqNode(Node* control, Node* char_array_mem, | |
801 Node* s1, Node* s2): Node(control, char_array_mem, s1, s2) {}; | |
802 virtual int Opcode() const; | |
803 virtual bool depends_only_on_test() const { return false; } | |
804 virtual const Type* bottom_type() const { return TypeInt::BOOL; } | |
805 virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; } | |
806 virtual uint match_edge(uint idx) const; | |
828 virtual uint ideal_reg() const { return Op_RegI; } | 807 virtual uint ideal_reg() const { return Op_RegI; } |
829 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | 808 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
830 }; | 809 }; |
831 | 810 |
832 //------------------------------MemBar----------------------------------------- | 811 //------------------------------MemBar----------------------------------------- |