< prev index next >

src/hotspot/share/opto/castnode.hpp

Print this page

193 class CastPPNode: public ConstraintCastNode {
194   public:
195   CastPPNode (Node* ctrl, Node* n, const Type* t, DependencyType dependency = RegularDependency, const TypeTuple* types = nullptr)
196     : ConstraintCastNode(ctrl, n, t, dependency, types) {
197     init_class_id(Class_CastPP);
198   }
199   virtual int Opcode() const;
200   virtual uint ideal_reg() const { return Op_RegP; }
201 };
202 
203 //------------------------------CheckCastPPNode--------------------------------
204 // for _checkcast, cast pointer to pointer (different type), without JOIN,
205 class CheckCastPPNode: public ConstraintCastNode {
206   public:
207   CheckCastPPNode(Node* ctrl, Node* n, const Type* t, DependencyType dependency = RegularDependency, const TypeTuple* types = nullptr)
208     : ConstraintCastNode(ctrl, n, t, dependency, types) {
209     assert(ctrl != nullptr, "control must be set");
210     init_class_id(Class_CheckCastPP);
211   }
212 

213   virtual const Type* Value(PhaseGVN* phase) const;
214   virtual int   Opcode() const;
215   virtual uint  ideal_reg() const { return Op_RegP; }
216   bool depends_only_on_test() const { return !type()->isa_rawptr() && ConstraintCastNode::depends_only_on_test(); }
217  };
218 
219 
220 //------------------------------CastX2PNode-------------------------------------
221 // convert a machine-pointer-sized integer to a raw pointer
222 class CastX2PNode : public Node {
223   public:
224   CastX2PNode( Node *n ) : Node(nullptr, n) {}
225   virtual int Opcode() const;
226   virtual const Type* Value(PhaseGVN* phase) const;
227   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
228   virtual Node* Identity(PhaseGVN* phase);
229   virtual uint ideal_reg() const { return Op_RegP; }
230   virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM; }
231 };
232 









233 //------------------------------CastP2XNode-------------------------------------
234 // Used in both 32-bit and 64-bit land.
235 // Used for card-marks and unsafe pointer math.
236 class CastP2XNode : public Node {
237   public:
238   CastP2XNode( Node *ctrl, Node *n ) : Node(ctrl, n) {}
239   virtual int Opcode() const;
240   virtual const Type* Value(PhaseGVN* phase) const;
241   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
242   virtual Node* Identity(PhaseGVN* phase);
243   virtual uint ideal_reg() const { return Op_RegX; }
244   virtual const Type *bottom_type() const { return TypeX_X; }
245   // Return false to keep node from moving away from an associated card mark.
246   virtual bool depends_only_on_test() const { return false; }
247 };
248 
249 
250 
251 #endif // SHARE_OPTO_CASTNODE_HPP

193 class CastPPNode: public ConstraintCastNode {
194   public:
195   CastPPNode (Node* ctrl, Node* n, const Type* t, DependencyType dependency = RegularDependency, const TypeTuple* types = nullptr)
196     : ConstraintCastNode(ctrl, n, t, dependency, types) {
197     init_class_id(Class_CastPP);
198   }
199   virtual int Opcode() const;
200   virtual uint ideal_reg() const { return Op_RegP; }
201 };
202 
203 //------------------------------CheckCastPPNode--------------------------------
204 // for _checkcast, cast pointer to pointer (different type), without JOIN,
205 class CheckCastPPNode: public ConstraintCastNode {
206   public:
207   CheckCastPPNode(Node* ctrl, Node* n, const Type* t, DependencyType dependency = RegularDependency, const TypeTuple* types = nullptr)
208     : ConstraintCastNode(ctrl, n, t, dependency, types) {
209     assert(ctrl != nullptr, "control must be set");
210     init_class_id(Class_CheckCastPP);
211   }
212 
213   virtual Node* Identity(PhaseGVN* phase);
214   virtual const Type* Value(PhaseGVN* phase) const;
215   virtual int   Opcode() const;
216   virtual uint  ideal_reg() const { return Op_RegP; }
217   bool depends_only_on_test() const { return !type()->isa_rawptr() && ConstraintCastNode::depends_only_on_test(); }
218  };
219 
220 
221 //------------------------------CastX2PNode-------------------------------------
222 // convert a machine-pointer-sized integer to a raw pointer
223 class CastX2PNode : public Node {
224   public:
225   CastX2PNode( Node *n ) : Node(nullptr, 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_RegP; }
231   virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM; }
232 };
233 
234 // Cast an integer to a narrow oop
235 class CastI2NNode : public Node {
236   public:
237   CastI2NNode(Node* ctrl, Node* n) : Node(ctrl, n) { }
238   virtual int Opcode() const;
239   virtual uint ideal_reg() const { return Op_RegN; }
240   virtual const Type* bottom_type() const { return TypeNarrowOop::BOTTOM; }
241 };
242 
243 //------------------------------CastP2XNode-------------------------------------
244 // Used in both 32-bit and 64-bit land.
245 // Used for card-marks and unsafe pointer math.
246 class CastP2XNode : public Node {
247   public:
248   CastP2XNode( Node *ctrl, Node *n ) : Node(ctrl, n) {}
249   virtual int Opcode() const;
250   virtual const Type* Value(PhaseGVN* phase) const;
251   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
252   virtual Node* Identity(PhaseGVN* phase);
253   virtual uint ideal_reg() const { return Op_RegX; }
254   virtual const Type *bottom_type() const { return TypeX_X; }
255   // Return false to keep node from moving away from an associated card mark.
256   virtual bool depends_only_on_test() const { return false; }
257 };
258 


259 #endif // SHARE_OPTO_CASTNODE_HPP
< prev index next >