hotspot/src/share/vm/opto/memnode.hpp
changeset 23528 8f1a7f5e8066
parent 22872 b6902ee5bc8d
child 24345 616bc709c0e4
equal deleted inserted replaced
23527:397b6816032d 23528:8f1a7f5e8066
   862                             Node* end_offset,
   862                             Node* end_offset,
   863                             PhaseGVN* phase);
   863                             PhaseGVN* phase);
   864   // Return allocation input memory edge if it is different instance
   864   // Return allocation input memory edge if it is different instance
   865   // or itself if it is the one we are looking for.
   865   // or itself if it is the one we are looking for.
   866   static bool step_through(Node** np, uint instance_id, PhaseTransform* phase);
   866   static bool step_through(Node** np, uint instance_id, PhaseTransform* phase);
   867 };
       
   868 
       
   869 //------------------------------StrIntrinsic-------------------------------
       
   870 // Base class for Ideal nodes used in String instrinsic code.
       
   871 class StrIntrinsicNode: public Node {
       
   872 public:
       
   873   StrIntrinsicNode(Node* control, Node* char_array_mem,
       
   874                    Node* s1, Node* c1, Node* s2, Node* c2):
       
   875     Node(control, char_array_mem, s1, c1, s2, c2) {
       
   876   }
       
   877 
       
   878   StrIntrinsicNode(Node* control, Node* char_array_mem,
       
   879                    Node* s1, Node* s2, Node* c):
       
   880     Node(control, char_array_mem, s1, s2, c) {
       
   881   }
       
   882 
       
   883   StrIntrinsicNode(Node* control, Node* char_array_mem,
       
   884                    Node* s1, Node* s2):
       
   885     Node(control, char_array_mem, s1, s2) {
       
   886   }
       
   887 
       
   888   virtual bool depends_only_on_test() const { return false; }
       
   889   virtual const TypePtr* adr_type() const { return TypeAryPtr::CHARS; }
       
   890   virtual uint match_edge(uint idx) const;
       
   891   virtual uint ideal_reg() const { return Op_RegI; }
       
   892   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
       
   893   virtual const Type *Value(PhaseTransform *phase) const;
       
   894 };
       
   895 
       
   896 //------------------------------StrComp-------------------------------------
       
   897 class StrCompNode: public StrIntrinsicNode {
       
   898 public:
       
   899   StrCompNode(Node* control, Node* char_array_mem,
       
   900               Node* s1, Node* c1, Node* s2, Node* c2):
       
   901     StrIntrinsicNode(control, char_array_mem, s1, c1, s2, c2) {};
       
   902   virtual int Opcode() const;
       
   903   virtual const Type* bottom_type() const { return TypeInt::INT; }
       
   904 };
       
   905 
       
   906 //------------------------------StrEquals-------------------------------------
       
   907 class StrEqualsNode: public StrIntrinsicNode {
       
   908 public:
       
   909   StrEqualsNode(Node* control, Node* char_array_mem,
       
   910                 Node* s1, Node* s2, Node* c):
       
   911     StrIntrinsicNode(control, char_array_mem, s1, s2, c) {};
       
   912   virtual int Opcode() const;
       
   913   virtual const Type* bottom_type() const { return TypeInt::BOOL; }
       
   914 };
       
   915 
       
   916 //------------------------------StrIndexOf-------------------------------------
       
   917 class StrIndexOfNode: public StrIntrinsicNode {
       
   918 public:
       
   919   StrIndexOfNode(Node* control, Node* char_array_mem,
       
   920               Node* s1, Node* c1, Node* s2, Node* c2):
       
   921     StrIntrinsicNode(control, char_array_mem, s1, c1, s2, c2) {};
       
   922   virtual int Opcode() const;
       
   923   virtual const Type* bottom_type() const { return TypeInt::INT; }
       
   924 };
       
   925 
       
   926 //------------------------------AryEq---------------------------------------
       
   927 class AryEqNode: public StrIntrinsicNode {
       
   928 public:
       
   929   AryEqNode(Node* control, Node* char_array_mem, Node* s1, Node* s2):
       
   930     StrIntrinsicNode(control, char_array_mem, s1, s2) {};
       
   931   virtual int Opcode() const;
       
   932   virtual const Type* bottom_type() const { return TypeInt::BOOL; }
       
   933 };
       
   934 
       
   935 
       
   936 //------------------------------EncodeISOArray--------------------------------
       
   937 // encode char[] to byte[] in ISO_8859_1
       
   938 class EncodeISOArrayNode: public Node {
       
   939 public:
       
   940   EncodeISOArrayNode(Node *control, Node* arymem, Node* s1, Node* s2, Node* c): Node(control, arymem, s1, s2, c) {};
       
   941   virtual int Opcode() const;
       
   942   virtual bool depends_only_on_test() const { return false; }
       
   943   virtual const Type* bottom_type() const { return TypeInt::INT; }
       
   944   virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; }
       
   945   virtual uint match_edge(uint idx) const;
       
   946   virtual uint ideal_reg() const { return Op_RegI; }
       
   947   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
       
   948   virtual const Type *Value(PhaseTransform *phase) const;
       
   949 };
   867 };
   950 
   868 
   951 //------------------------------MemBar-----------------------------------------
   869 //------------------------------MemBar-----------------------------------------
   952 // There are different flavors of Memory Barriers to match the Java Memory
   870 // There are different flavors of Memory Barriers to match the Java Memory
   953 // Model.  Monitor-enter and volatile-load act as Aquires: no following ref
   871 // Model.  Monitor-enter and volatile-load act as Aquires: no following ref