< prev index next >

src/hotspot/share/opto/locknode.hpp

Print this page

 76   virtual const class Type *bottom_type() const { return TypeRawPtr::BOTTOM; }
 77   virtual uint ideal_reg() const { return Op_RegP; }
 78   virtual Node* Identity(PhaseGVN* phase);
 79 
 80   static OptoReg::Name reg(Node* box_node);
 81   static BoxLockNode* box_node(Node* box_node);
 82   static bool same_slot(Node* box1, Node* box2) {
 83     return box1->as_BoxLock()->_slot == box2->as_BoxLock()->_slot;
 84   }
 85   int stack_slot() const { return _slot; }
 86 
 87   bool is_regular()    const { return _kind == Regular; }
 88   bool is_local()      const { return _kind == Local; }
 89   bool is_nested()     const { return _kind == Nested; }
 90   bool is_coarsened()  const { return _kind == Coarsened; }
 91   bool is_eliminated() const { return _kind == Eliminated; }
 92   bool is_unbalanced() const { return _kind == Unbalanced; }
 93 
 94   void set_local()      {
 95     assert((_kind == Regular || _kind == Local || _kind == Coarsened),
 96            "incorrect kind for Local transitioni: %s", _kind_name[(int)_kind]);
 97     _kind = Local;
 98   }
 99   void set_nested()     {
100     assert((_kind == Regular || _kind == Nested || _kind == Coarsened),
101            "incorrect kind for Nested transition: %s", _kind_name[(int)_kind]);
102     _kind = Nested;
103   }
104   void set_coarsened()  {
105     assert((_kind == Regular || _kind == Coarsened),
106            "incorrect kind for Coarsened transition: %s", _kind_name[(int)_kind]);
107     _kind = Coarsened;
108   }
109   void set_eliminated() {
110     assert((_kind == Local || _kind == Nested),
111            "incorrect kind for Eliminated transition: %s", _kind_name[(int)_kind]);
112     _kind = Eliminated;
113   }
114   void set_unbalanced() {
115     assert((_kind == Coarsened || _kind == Unbalanced),
116            "incorrect kind for Unbalanced transition: %s", _kind_name[(int)_kind]);

128 #endif
129 };
130 
131 //------------------------------FastLockNode-----------------------------------
132 class FastLockNode: public CmpNode {
133 public:
134   FastLockNode(Node *ctrl, Node *oop, Node *box) : CmpNode(oop,box) {
135     init_req(0,ctrl);
136     init_class_id(Class_FastLock);
137   }
138   Node* obj_node() const { return in(1); }
139   Node* box_node() const { return in(2); }
140   void  set_box_node(Node* box) { set_req(2, box); }
141 
142   // FastLock and FastUnlockNode do not hash, we need one for each corresponding
143   // LockNode/UnLockNode to avoid creating Phi's.
144   virtual uint hash() const ;                  // { return NO_HASH; }
145   virtual uint size_of() const;
146   virtual bool cmp( const Node &n ) const ;    // Always fail, except on self
147   virtual int Opcode() const;
148   virtual const Type* Value(PhaseGVN* phase) const { return TypeInt::CC; }
149   const Type *sub(const Type *t1, const Type *t2) const { return TypeInt::CC;}
150 };
151 
152 
153 //------------------------------FastUnlockNode---------------------------------
154 class FastUnlockNode: public CmpNode {
155 public:
156   FastUnlockNode(Node *ctrl, Node *oop, Node *box) : CmpNode(oop,box) {
157     init_req(0,ctrl);
158     init_class_id(Class_FastUnlock);
159   }
160   Node* obj_node() const { return in(1); }
161   Node* box_node() const { return in(2); }
162 
163 
164   // FastLock and FastUnlockNode do not hash, we need one for each corresponding
165   // LockNode/UnLockNode to avoid creating Phi's.
166   virtual uint hash() const ;                  // { return NO_HASH; }
167   virtual bool cmp( const Node &n ) const ;    // Always fail, except on self
168   virtual int Opcode() const;

 76   virtual const class Type *bottom_type() const { return TypeRawPtr::BOTTOM; }
 77   virtual uint ideal_reg() const { return Op_RegP; }
 78   virtual Node* Identity(PhaseGVN* phase);
 79 
 80   static OptoReg::Name reg(Node* box_node);
 81   static BoxLockNode* box_node(Node* box_node);
 82   static bool same_slot(Node* box1, Node* box2) {
 83     return box1->as_BoxLock()->_slot == box2->as_BoxLock()->_slot;
 84   }
 85   int stack_slot() const { return _slot; }
 86 
 87   bool is_regular()    const { return _kind == Regular; }
 88   bool is_local()      const { return _kind == Local; }
 89   bool is_nested()     const { return _kind == Nested; }
 90   bool is_coarsened()  const { return _kind == Coarsened; }
 91   bool is_eliminated() const { return _kind == Eliminated; }
 92   bool is_unbalanced() const { return _kind == Unbalanced; }
 93 
 94   void set_local()      {
 95     assert((_kind == Regular || _kind == Local || _kind == Coarsened),
 96            "incorrect kind for Local transition: %s", _kind_name[(int)_kind]);
 97     _kind = Local;
 98   }
 99   void set_nested()     {
100     assert((_kind == Regular || _kind == Nested || _kind == Coarsened),
101            "incorrect kind for Nested transition: %s", _kind_name[(int)_kind]);
102     _kind = Nested;
103   }
104   void set_coarsened()  {
105     assert((_kind == Regular || _kind == Coarsened),
106            "incorrect kind for Coarsened transition: %s", _kind_name[(int)_kind]);
107     _kind = Coarsened;
108   }
109   void set_eliminated() {
110     assert((_kind == Local || _kind == Nested),
111            "incorrect kind for Eliminated transition: %s", _kind_name[(int)_kind]);
112     _kind = Eliminated;
113   }
114   void set_unbalanced() {
115     assert((_kind == Coarsened || _kind == Unbalanced),
116            "incorrect kind for Unbalanced transition: %s", _kind_name[(int)_kind]);

128 #endif
129 };
130 
131 //------------------------------FastLockNode-----------------------------------
132 class FastLockNode: public CmpNode {
133 public:
134   FastLockNode(Node *ctrl, Node *oop, Node *box) : CmpNode(oop,box) {
135     init_req(0,ctrl);
136     init_class_id(Class_FastLock);
137   }
138   Node* obj_node() const { return in(1); }
139   Node* box_node() const { return in(2); }
140   void  set_box_node(Node* box) { set_req(2, box); }
141 
142   // FastLock and FastUnlockNode do not hash, we need one for each corresponding
143   // LockNode/UnLockNode to avoid creating Phi's.
144   virtual uint hash() const ;                  // { return NO_HASH; }
145   virtual uint size_of() const;
146   virtual bool cmp( const Node &n ) const ;    // Always fail, except on self
147   virtual int Opcode() const;
148   virtual const Type* Value(PhaseGVN* phase) const;
149   const Type *sub(const Type *t1, const Type *t2) const { return TypeInt::CC;}
150 };
151 
152 
153 //------------------------------FastUnlockNode---------------------------------
154 class FastUnlockNode: public CmpNode {
155 public:
156   FastUnlockNode(Node *ctrl, Node *oop, Node *box) : CmpNode(oop,box) {
157     init_req(0,ctrl);
158     init_class_id(Class_FastUnlock);
159   }
160   Node* obj_node() const { return in(1); }
161   Node* box_node() const { return in(2); }
162 
163 
164   // FastLock and FastUnlockNode do not hash, we need one for each corresponding
165   // LockNode/UnLockNode to avoid creating Phi's.
166   virtual uint hash() const ;                  // { return NO_HASH; }
167   virtual bool cmp( const Node &n ) const ;    // Always fail, except on self
168   virtual int Opcode() const;
< prev index next >