< prev index next >

src/share/vm/opto/castnode.hpp

Print this page




  34 class ConstraintCastNode: public TypeNode {
  35   protected:
  36   // Can this node be removed post CCP or does it carry a required dependency?
  37   const bool _carry_dependency;
  38   virtual uint cmp( const Node &n ) const;
  39   virtual uint size_of() const;
  40 
  41   public:
  42   ConstraintCastNode(Node *n, const Type *t, bool carry_dependency)
  43     : TypeNode(t,2), _carry_dependency(carry_dependency) {
  44     init_class_id(Class_ConstraintCast);
  45     init_req(1, n);
  46   }
  47   virtual Node* Identity(PhaseGVN* phase);
  48   virtual const Type* Value(PhaseGVN* phase) const;
  49   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
  50   virtual int Opcode() const;
  51   virtual uint ideal_reg() const = 0;
  52   virtual bool depends_only_on_test() const { return !_carry_dependency; }
  53   bool carry_dependency() const { return _carry_dependency; }
  54   TypeNode* dominating_cast(PhaseTransform *phase) const;
  55   static Node* make_cast(int opcode,  Node* c, Node *n, const Type *t, bool carry_dependency);
  56 
  57 #ifndef PRODUCT
  58   virtual void dump_spec(outputStream *st) const;
  59 #endif
  60 };
  61 
  62 //------------------------------CastIINode-------------------------------------
  63 // cast integer to integer (different range)
  64 class CastIINode: public ConstraintCastNode {
  65   protected:
  66   // Is this node dependent on a range check?
  67   const bool _range_check_dependency;
  68   virtual uint cmp(const Node &n) const;
  69   virtual uint size_of() const;
  70 
  71   public:
  72   CastIINode(Node* n, const Type* t, bool carry_dependency = false, bool range_check_dependency = false)
  73     : ConstraintCastNode(n, t, carry_dependency), _range_check_dependency(range_check_dependency) {
  74     init_class_id(Class_CastII);




  34 class ConstraintCastNode: public TypeNode {
  35   protected:
  36   // Can this node be removed post CCP or does it carry a required dependency?
  37   const bool _carry_dependency;
  38   virtual uint cmp( const Node &n ) const;
  39   virtual uint size_of() const;
  40 
  41   public:
  42   ConstraintCastNode(Node *n, const Type *t, bool carry_dependency)
  43     : TypeNode(t,2), _carry_dependency(carry_dependency) {
  44     init_class_id(Class_ConstraintCast);
  45     init_req(1, n);
  46   }
  47   virtual Node* Identity(PhaseGVN* phase);
  48   virtual const Type* Value(PhaseGVN* phase) const;
  49   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
  50   virtual int Opcode() const;
  51   virtual uint ideal_reg() const = 0;
  52   virtual bool depends_only_on_test() const { return !_carry_dependency; }
  53   bool carry_dependency() const { return _carry_dependency; }
  54   TypeNode* dominating_cast(PhaseGVN* gvn, PhaseTransform* pt) const;
  55   static Node* make_cast(int opcode,  Node* c, Node *n, const Type *t, bool carry_dependency);
  56 
  57 #ifndef PRODUCT
  58   virtual void dump_spec(outputStream *st) const;
  59 #endif
  60 };
  61 
  62 //------------------------------CastIINode-------------------------------------
  63 // cast integer to integer (different range)
  64 class CastIINode: public ConstraintCastNode {
  65   protected:
  66   // Is this node dependent on a range check?
  67   const bool _range_check_dependency;
  68   virtual uint cmp(const Node &n) const;
  69   virtual uint size_of() const;
  70 
  71   public:
  72   CastIINode(Node* n, const Type* t, bool carry_dependency = false, bool range_check_dependency = false)
  73     : ConstraintCastNode(n, t, carry_dependency), _range_check_dependency(range_check_dependency) {
  74     init_class_id(Class_CastII);


< prev index next >