src/share/vm/opto/connode.hpp

Print this page




 216 
 217 //------------------------------ConstraintCastNode-----------------------------
 218 // cast to a different range
 219 class ConstraintCastNode: public TypeNode {
 220 public:
 221   ConstraintCastNode (Node *n, const Type *t ): TypeNode(t,2) {
 222     init_class_id(Class_ConstraintCast);
 223     init_req(1, n);
 224   }
 225   virtual Node *Identity( PhaseTransform *phase );
 226   virtual const Type *Value( PhaseTransform *phase ) const;
 227   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 228   virtual int Opcode() const;
 229   virtual uint ideal_reg() const = 0;
 230   virtual Node *Ideal_DU_postCCP( PhaseCCP * );
 231 };
 232 
 233 //------------------------------CastIINode-------------------------------------
 234 // cast integer to integer (different range)
 235 class CastIINode: public ConstraintCastNode {








 236 public:
 237   CastIINode (Node *n, const Type *t ): ConstraintCastNode(n,t) {}

 238   virtual int Opcode() const;
 239   virtual uint ideal_reg() const { return Op_RegI; }






 240 };
 241 
 242 //------------------------------CastPPNode-------------------------------------
 243 // cast pointer to pointer (different type)
 244 class CastPPNode: public ConstraintCastNode {
 245 public:
 246   CastPPNode (Node *n, const Type *t ): ConstraintCastNode(n, t) {}
 247   virtual int Opcode() const;
 248   virtual uint ideal_reg() const { return Op_RegP; }
 249   virtual Node *Ideal_DU_postCCP( PhaseCCP * );
 250 };
 251 
 252 //------------------------------CheckCastPPNode--------------------------------
 253 // for _checkcast, cast pointer to pointer (different type), without JOIN,
 254 class CheckCastPPNode: public TypeNode {
 255 public:
 256   CheckCastPPNode( Node *c, Node *n, const Type *t ) : TypeNode(t,2) {
 257     init_class_id(Class_CheckCastPP);
 258     init_req(0, c);
 259     init_req(1, n);




 216 
 217 //------------------------------ConstraintCastNode-----------------------------
 218 // cast to a different range
 219 class ConstraintCastNode: public TypeNode {
 220 public:
 221   ConstraintCastNode (Node *n, const Type *t ): TypeNode(t,2) {
 222     init_class_id(Class_ConstraintCast);
 223     init_req(1, n);
 224   }
 225   virtual Node *Identity( PhaseTransform *phase );
 226   virtual const Type *Value( PhaseTransform *phase ) const;
 227   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 228   virtual int Opcode() const;
 229   virtual uint ideal_reg() const = 0;
 230   virtual Node *Ideal_DU_postCCP( PhaseCCP * );
 231 };
 232 
 233 //------------------------------CastIINode-------------------------------------
 234 // cast integer to integer (different range)
 235 class CastIINode: public ConstraintCastNode {
 236   private:
 237   // Can this node be removed post CCP or does it carry a required dependency?
 238   const bool _carry_dependency;
 239 
 240   protected:
 241   virtual uint cmp( const Node &n ) const;
 242   virtual uint size_of() const;
 243 
 244 public:
 245   CastIINode(Node *n, const Type *t, bool carry_dependency = false)
 246     : ConstraintCastNode(n,t), _carry_dependency(carry_dependency) {}
 247   virtual int Opcode() const;
 248   virtual uint ideal_reg() const { return Op_RegI; }
 249   virtual Node *Identity( PhaseTransform *phase );
 250   virtual const Type *Value( PhaseTransform *phase ) const;
 251   virtual Node *Ideal_DU_postCCP( PhaseCCP * );
 252 #ifndef PRODUCT
 253   virtual void dump_spec(outputStream *st) const;
 254 #endif
 255 };
 256 
 257 //------------------------------CastPPNode-------------------------------------
 258 // cast pointer to pointer (different type)
 259 class CastPPNode: public ConstraintCastNode {
 260 public:
 261   CastPPNode (Node *n, const Type *t ): ConstraintCastNode(n, t) {}
 262   virtual int Opcode() const;
 263   virtual uint ideal_reg() const { return Op_RegP; }
 264   virtual Node *Ideal_DU_postCCP( PhaseCCP * );
 265 };
 266 
 267 //------------------------------CheckCastPPNode--------------------------------
 268 // for _checkcast, cast pointer to pointer (different type), without JOIN,
 269 class CheckCastPPNode: public TypeNode {
 270 public:
 271   CheckCastPPNode( Node *c, Node *n, const Type *t ) : TypeNode(t,2) {
 272     init_class_id(Class_CheckCastPP);
 273     init_req(0, c);
 274     init_req(1, n);