< prev index next >

src/hotspot/share/opto/castnode.hpp

Print this page

177 //------------------------------CastPPNode-------------------------------------
178 // cast pointer to pointer (different type)
179 class CastPPNode: public ConstraintCastNode {
180   public:
181   CastPPNode (Node* ctrl, Node* n, const Type* t, DependencyType dependency = RegularDependency, const TypeTuple* types = nullptr)
182     : ConstraintCastNode(ctrl, n, t, dependency, types) {
183   }
184   virtual int Opcode() const;
185   virtual uint ideal_reg() const { return Op_RegP; }
186 };
187 
188 //------------------------------CheckCastPPNode--------------------------------
189 // for _checkcast, cast pointer to pointer (different type), without JOIN,
190 class CheckCastPPNode: public ConstraintCastNode {
191   public:
192   CheckCastPPNode(Node* ctrl, Node* n, const Type* t, DependencyType dependency = RegularDependency, const TypeTuple* types = nullptr)
193     : ConstraintCastNode(ctrl, n, t, dependency, types) {
194     init_class_id(Class_CheckCastPP);
195   }
196 

197   virtual const Type* Value(PhaseGVN* phase) const;
198   virtual int   Opcode() const;
199   virtual uint  ideal_reg() const { return Op_RegP; }
200   bool depends_only_on_test() const { return !type()->isa_rawptr() && ConstraintCastNode::depends_only_on_test(); }
201  };
202 
203 
204 //------------------------------CastX2PNode-------------------------------------
205 // convert a machine-pointer-sized integer to a raw pointer
206 class CastX2PNode : public Node {
207   public:
208   CastX2PNode( Node *n ) : Node(nullptr, n) {}
209   virtual int Opcode() const;
210   virtual const Type* Value(PhaseGVN* phase) const;
211   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
212   virtual Node* Identity(PhaseGVN* phase);
213   virtual uint ideal_reg() const { return Op_RegP; }
214   virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM; }
215 };
216 
217 //------------------------------CastP2XNode-------------------------------------
218 // Used in both 32-bit and 64-bit land.
219 // Used for card-marks and unsafe pointer math.
220 class CastP2XNode : public Node {
221   public:
222   CastP2XNode( Node *ctrl, Node *n ) : Node(ctrl, n) {}
223   virtual int Opcode() const;
224   virtual const Type* Value(PhaseGVN* phase) const;
225   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
226   virtual Node* Identity(PhaseGVN* phase);
227   virtual uint ideal_reg() const { return Op_RegX; }
228   virtual const Type *bottom_type() const { return TypeX_X; }
229   // Return false to keep node from moving away from an associated card mark.
230   virtual bool depends_only_on_test() const { return false; }
231 };
232 
233 
234 
235 #endif // SHARE_OPTO_CASTNODE_HPP

177 //------------------------------CastPPNode-------------------------------------
178 // cast pointer to pointer (different type)
179 class CastPPNode: public ConstraintCastNode {
180   public:
181   CastPPNode (Node* ctrl, Node* n, const Type* t, DependencyType dependency = RegularDependency, const TypeTuple* types = nullptr)
182     : ConstraintCastNode(ctrl, n, t, dependency, types) {
183   }
184   virtual int Opcode() const;
185   virtual uint ideal_reg() const { return Op_RegP; }
186 };
187 
188 //------------------------------CheckCastPPNode--------------------------------
189 // for _checkcast, cast pointer to pointer (different type), without JOIN,
190 class CheckCastPPNode: public ConstraintCastNode {
191   public:
192   CheckCastPPNode(Node* ctrl, Node* n, const Type* t, DependencyType dependency = RegularDependency, const TypeTuple* types = nullptr)
193     : ConstraintCastNode(ctrl, n, t, dependency, types) {
194     init_class_id(Class_CheckCastPP);
195   }
196 
197   virtual Node* Identity(PhaseGVN* phase);
198   virtual const Type* Value(PhaseGVN* phase) const;
199   virtual int   Opcode() const;
200   virtual uint  ideal_reg() const { return Op_RegP; }
201   bool depends_only_on_test() const { return !type()->isa_rawptr() && ConstraintCastNode::depends_only_on_test(); }
202  };
203 
204 
205 //------------------------------CastX2PNode-------------------------------------
206 // convert a machine-pointer-sized integer to a raw pointer
207 class CastX2PNode : public Node {
208   public:
209   CastX2PNode( Node *n ) : Node(nullptr, n) {}
210   virtual int Opcode() const;
211   virtual const Type* Value(PhaseGVN* phase) const;
212   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
213   virtual Node* Identity(PhaseGVN* phase);
214   virtual uint ideal_reg() const { return Op_RegP; }
215   virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM; }
216 };
217 
218 //------------------------------CastP2XNode-------------------------------------
219 // Used in both 32-bit and 64-bit land.
220 // Used for card-marks and unsafe pointer math.
221 class CastP2XNode : public Node {
222   public:
223   CastP2XNode( Node *ctrl, Node *n ) : Node(ctrl, n) {}
224   virtual int Opcode() const;
225   virtual const Type* Value(PhaseGVN* phase) const;
226   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
227   virtual Node* Identity(PhaseGVN* phase);
228   virtual uint ideal_reg() const { return Op_RegX; }
229   virtual const Type *bottom_type() const { return TypeX_X; }
230   // Return false to keep node from moving away from an associated card mark.
231   virtual bool depends_only_on_test() const { return false; }
232 };
233 


234 #endif // SHARE_OPTO_CASTNODE_HPP
< prev index next >