src/share/vm/opto/connode.hpp

Print this page




 218 //------------------------------CMoveNNode-------------------------------------
 219 class CMoveNNode : public CMoveNode {
 220 public:
 221   CMoveNNode( Node *c, Node *bol, Node *left, Node *right, const Type* t ) : CMoveNode(bol,left,right,t) { init_req(Control,c); }
 222   virtual int Opcode() const;
 223 };
 224 
 225 //------------------------------ConstraintCastNode-----------------------------
 226 // cast to a different range
 227 class ConstraintCastNode: public TypeNode {
 228 public:
 229   ConstraintCastNode (Node *n, const Type *t ): TypeNode(t,2) {
 230     init_class_id(Class_ConstraintCast);
 231     init_req(1, n);
 232   }
 233   virtual Node *Identity( PhaseTransform *phase );
 234   virtual const Type *Value( PhaseTransform *phase ) const;
 235   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 236   virtual int Opcode() const;
 237   virtual uint ideal_reg() const = 0;
 238   virtual Node *Ideal_DU_postCCP( PhaseCCP * );
 239 };
 240 
 241 //------------------------------CastIINode-------------------------------------
 242 // cast integer to integer (different range)
 243 class CastIINode: public ConstraintCastNode {
 244   private:
 245   // Can this node be removed post CCP or does it carry a required dependency?
 246   const bool _carry_dependency;
 247   // Is this node dependent on a range check?
 248   const bool _range_check_dependency;
 249 
 250   protected:
 251   virtual uint cmp( const Node &n ) const;
 252   virtual uint size_of() const;
 253 
 254 public:
 255   CastIINode(Node *n, const Type *t, bool carry_dependency = false, bool range_check_dependency = false)
 256     : ConstraintCastNode(n,t), _carry_dependency(carry_dependency), _range_check_dependency(range_check_dependency) {
 257     init_class_id(Class_CastII);
 258   }
 259   virtual int Opcode() const;
 260   virtual uint ideal_reg() const { return Op_RegI; }
 261   virtual Node *Identity( PhaseTransform *phase );
 262   virtual const Type *Value( PhaseTransform *phase ) const;
 263   virtual Node *Ideal_DU_postCCP( PhaseCCP * );
 264   const bool has_range_check() {
 265  #ifdef _LP64
 266      return _range_check_dependency;
 267  #else
 268      assert(!_range_check_dependency, "Should not have range check dependency");
 269      return false;
 270  #endif
 271    }
 272 #ifndef PRODUCT
 273   virtual void dump_spec(outputStream *st) const;
 274 #endif
 275 };
 276 
 277 //------------------------------CastPPNode-------------------------------------
 278 // cast pointer to pointer (different type)
 279 class CastPPNode: public ConstraintCastNode {
 280 public:
 281   CastPPNode (Node *n, const Type *t ): ConstraintCastNode(n, t) {}
 282   virtual int Opcode() const;
 283   virtual uint ideal_reg() const { return Op_RegP; }
 284   virtual Node *Ideal_DU_postCCP( PhaseCCP * );
 285 };
 286 
 287 //------------------------------CheckCastPPNode--------------------------------
 288 // for _checkcast, cast pointer to pointer (different type), without JOIN,
 289 class CheckCastPPNode: public TypeNode {
 290 public:
 291   CheckCastPPNode( Node *c, Node *n, const Type *t ) : TypeNode(t,2) {
 292     init_class_id(Class_CheckCastPP);
 293     init_req(0, c);
 294     init_req(1, n);
 295   }
 296 
 297   virtual Node *Identity( PhaseTransform *phase );
 298   virtual const Type *Value( PhaseTransform *phase ) const;
 299   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 300   virtual int   Opcode() const;
 301   virtual uint  ideal_reg() const { return Op_RegP; }
 302   // No longer remove CheckCast after CCP as it gives me a place to hang
 303   // the proper address type - which is required to compute anti-deps.
 304   //virtual Node *Ideal_DU_postCCP( PhaseCCP * );
 305 };
 306 
 307 
 308 //------------------------------EncodeNarrowPtr--------------------------------
 309 class EncodeNarrowPtrNode : public TypeNode {
 310  protected:
 311   EncodeNarrowPtrNode(Node* value, const Type* type):
 312     TypeNode(type, 2) {
 313     init_class_id(Class_EncodeNarrowPtr);
 314     init_req(0, NULL);
 315     init_req(1, value);
 316   }
 317  public:
 318   virtual uint  ideal_reg() const { return Op_RegN; }
 319   virtual Node *Ideal_DU_postCCP( PhaseCCP *ccp );
 320 };
 321 
 322 //------------------------------EncodeP--------------------------------
 323 // Encodes an oop pointers into its compressed form
 324 // Takes an extra argument which is the real heap base as a long which
 325 // may be useful for code generation in the backend.
 326 class EncodePNode : public EncodeNarrowPtrNode {
 327  public:
 328   EncodePNode(Node* value, const Type* type):
 329     EncodeNarrowPtrNode(value, type) {
 330     init_class_id(Class_EncodeP);
 331   }
 332   virtual int Opcode() const;
 333   virtual Node *Identity( PhaseTransform *phase );
 334   virtual const Type *Value( PhaseTransform *phase ) const;
 335 };
 336 
 337 //------------------------------EncodePKlass--------------------------------
 338 // Encodes a klass pointer into its compressed form
 339 // Takes an extra argument which is the real heap base as a long which




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

 238 };
 239 
 240 //------------------------------CastIINode-------------------------------------
 241 // cast integer to integer (different range)
 242 class CastIINode: public ConstraintCastNode {
 243   private:
 244   // Can this node be removed post CCP or does it carry a required dependency?
 245   const bool _carry_dependency;
 246   // Is this node dependent on a range check?
 247   const bool _range_check_dependency;
 248 
 249   protected:
 250   virtual uint cmp( const Node &n ) const;
 251   virtual uint size_of() const;
 252 
 253 public:
 254   CastIINode(Node *n, const Type *t, bool carry_dependency = false, bool range_check_dependency = false)
 255     : ConstraintCastNode(n,t), _carry_dependency(carry_dependency), _range_check_dependency(range_check_dependency) {
 256     init_class_id(Class_CastII);
 257   }
 258   virtual int Opcode() const;
 259   virtual uint ideal_reg() const { return Op_RegI; }
 260   virtual Node *Identity( PhaseTransform *phase );
 261   virtual const Type *Value( PhaseTransform *phase ) const;

 262   const bool has_range_check() {
 263  #ifdef _LP64
 264      return _range_check_dependency;
 265  #else
 266      assert(!_range_check_dependency, "Should not have range check dependency");
 267      return false;
 268  #endif
 269    }
 270 #ifndef PRODUCT
 271   virtual void dump_spec(outputStream *st) const;
 272 #endif
 273 };
 274 
 275 //------------------------------CastPPNode-------------------------------------
 276 // cast pointer to pointer (different type)
 277 class CastPPNode: public ConstraintCastNode {
 278 public:
 279   CastPPNode (Node *n, const Type *t ): ConstraintCastNode(n, t) {}
 280   virtual int Opcode() const;
 281   virtual uint ideal_reg() const { return Op_RegP; }

 282 };
 283 
 284 //------------------------------CheckCastPPNode--------------------------------
 285 // for _checkcast, cast pointer to pointer (different type), without JOIN,
 286 class CheckCastPPNode: public TypeNode {
 287 public:
 288   CheckCastPPNode( Node *c, Node *n, const Type *t ) : TypeNode(t,2) {
 289     init_class_id(Class_CheckCastPP);
 290     init_req(0, c);
 291     init_req(1, n);
 292   }
 293 
 294   virtual Node *Identity( PhaseTransform *phase );
 295   virtual const Type *Value( PhaseTransform *phase ) const;
 296   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 297   virtual int   Opcode() const;
 298   virtual uint  ideal_reg() const { return Op_RegP; }



 299 };
 300 
 301 
 302 //------------------------------EncodeNarrowPtr--------------------------------
 303 class EncodeNarrowPtrNode : public TypeNode {
 304  protected:
 305   EncodeNarrowPtrNode(Node* value, const Type* type):
 306     TypeNode(type, 2) {
 307     init_class_id(Class_EncodeNarrowPtr);
 308     init_req(0, NULL);
 309     init_req(1, value);
 310   }
 311  public:
 312   virtual uint  ideal_reg() const { return Op_RegN; }

 313 };
 314 
 315 //------------------------------EncodeP--------------------------------
 316 // Encodes an oop pointers into its compressed form
 317 // Takes an extra argument which is the real heap base as a long which
 318 // may be useful for code generation in the backend.
 319 class EncodePNode : public EncodeNarrowPtrNode {
 320  public:
 321   EncodePNode(Node* value, const Type* type):
 322     EncodeNarrowPtrNode(value, type) {
 323     init_class_id(Class_EncodeP);
 324   }
 325   virtual int Opcode() const;
 326   virtual Node *Identity( PhaseTransform *phase );
 327   virtual const Type *Value( PhaseTransform *phase ) const;
 328 };
 329 
 330 //------------------------------EncodePKlass--------------------------------
 331 // Encodes a klass pointer into its compressed form
 332 // Takes an extra argument which is the real heap base as a long which