< prev index next >

src/hotspot/share/opto/castnode.hpp

Print this page

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

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

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


237 #endif // SHARE_OPTO_CASTNODE_HPP
< prev index next >