src/share/vm/opto/memnode.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6827605 Sdiff src/share/vm/opto

src/share/vm/opto/memnode.hpp

Print this page




 727   // The start offset must always be aligned mod BytesPerInt.
 728   // The end offset must always be aligned mod BytesPerLong.
 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);
 826 };
 827 
 828 //------------------------------MemBar-----------------------------------------
 829 // There are different flavors of Memory Barriers to match the Java Memory
 830 // Model.  Monitor-enter and volatile-load act as Aquires: no following ref
 831 // can be moved to before them.  We insert a MemBar-Acquire after a FastLock or
 832 // volatile-load.  Monitor-exit and volatile-store act as Release: no
 833 // preceding ref can be moved to after them.  We insert a MemBar-Release
 834 // before a FastUnlock or volatile-store.  All volatiles need to be
 835 // serialized, so we follow all volatile-stores with a MemBar-Volatile to
 836 // separate it from any following volatile-load.
 837 class MemBarNode: public MultiNode {
 838   virtual uint hash() const ;                  // { return NO_HASH; }
 839   virtual uint cmp( const Node &n ) const ;    // Always fail, except on self
 840 
 841   virtual uint size_of() const { return sizeof(*this); }
 842   // Memory type this node is serializing.  Usually either rawptr or bottom.
 843   const TypePtr* _adr_type;




 727   // The start offset must always be aligned mod BytesPerInt.
 728   // The end offset must always be aligned mod BytesPerLong.
 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, Node* char_array_mem,
 748               Node* s1, Node* c1,
 749               Node* s2, Node* c2): Node(control, char_array_mem,
 750                                         s1, c1,
 751                                         s2, c2) {};






 752   virtual int Opcode() const;
 753   virtual bool depends_only_on_test() const { return false; }
 754   virtual const Type* bottom_type() const { return TypeInt::INT; }
 755   virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; }

 756   virtual uint match_edge(uint idx) const;
 757   virtual uint ideal_reg() const { return Op_RegI; }
 758   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 759 };
 760 
 761 //------------------------------StrEquals-------------------------------------
 762 class StrEqualsNode: public Node {
 763 public:
 764   StrEqualsNode(Node* control, Node* char_array_mem,
 765                 Node* s1, Node* s2, Node* c): Node(control, char_array_mem,
 766                                                    s1, s2, c) {};








 767   virtual int Opcode() const;
 768   virtual bool depends_only_on_test() const { return false; }
 769   virtual const Type* bottom_type() const { return TypeInt::BOOL; }
 770   virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; }

 771   virtual uint match_edge(uint idx) const;
 772   virtual uint ideal_reg() const { return Op_RegI; }
 773   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 774 };
 775 
 776 //------------------------------StrIndexOf-------------------------------------
 777 class StrIndexOfNode: public Node {
 778 public:
 779   StrIndexOfNode(Node* control, Node* char_array_mem,
 780                  Node* s1, Node* c1,
 781                  Node* s2, Node* c2): Node(control, char_array_mem,
 782                                            s1, c1,
 783                                            s2, c2) {};






 784   virtual int Opcode() const;
 785   virtual bool depends_only_on_test() const { return false; }
 786   virtual const Type* bottom_type() const { return TypeInt::INT; }
 787   virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; }

 788   virtual uint match_edge(uint idx) const;
 789   virtual uint ideal_reg() const { return Op_RegI; }
 790   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 791 };
 792 
 793 //------------------------------AryEq---------------------------------------
 794 class AryEqNode: public Node {
 795 public:
 796   AryEqNode(Node* control, Node* char_array_mem,
 797             Node* s1, Node* s2): Node(control, char_array_mem, s1, s2) {};
 798   virtual int Opcode() const;
 799   virtual bool depends_only_on_test() const { return false; }
 800   virtual const Type* bottom_type() const { return TypeInt::BOOL; }
 801   virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; }
 802   virtual uint match_edge(uint idx) const;
 803   virtual uint ideal_reg() const { return Op_RegI; }
 804   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 805 };
 806 
 807 //------------------------------MemBar-----------------------------------------
 808 // There are different flavors of Memory Barriers to match the Java Memory
 809 // Model.  Monitor-enter and volatile-load act as Aquires: no following ref
 810 // can be moved to before them.  We insert a MemBar-Acquire after a FastLock or
 811 // volatile-load.  Monitor-exit and volatile-store act as Release: no
 812 // preceding ref can be moved to after them.  We insert a MemBar-Release
 813 // before a FastUnlock or volatile-store.  All volatiles need to be
 814 // serialized, so we follow all volatile-stores with a MemBar-Volatile to
 815 // separate it from any following volatile-load.
 816 class MemBarNode: public MultiNode {
 817   virtual uint hash() const ;                  // { return NO_HASH; }
 818   virtual uint cmp( const Node &n ) const ;    // Always fail, except on self
 819 
 820   virtual uint size_of() const { return sizeof(*this); }
 821   // Memory type this node is serializing.  Usually either rawptr or bottom.
 822   const TypePtr* _adr_type;


src/share/vm/opto/memnode.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File