< prev index next >

src/share/vm/opto/mathexactnode.hpp

Print this page




  31 #include "opto/subnode.hpp"
  32 #include "opto/type.hpp"
  33 
  34 class PhaseGVN;
  35 class PhaseTransform;
  36 
  37 class OverflowNode : public CmpNode {
  38 public:
  39   OverflowNode(Node* in1, Node* in2) : CmpNode(in1, in2) {}
  40 
  41   virtual uint ideal_reg() const { return Op_RegFlags; }
  42   virtual const Type* sub(const Type* t1, const Type* t2) const;
  43 };
  44 
  45 class OverflowINode : public OverflowNode {
  46 public:
  47   typedef TypeInt TypeClass;
  48 
  49   OverflowINode(Node* in1, Node* in2) : OverflowNode(in1, in2) {}
  50   virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
  51   virtual const Type* Value(PhaseTransform* phase) const;
  52 
  53   virtual bool will_overflow(jint v1, jint v2) const = 0;
  54   virtual bool can_overflow(const Type* t1, const Type* t2) const = 0;
  55 };
  56 
  57 
  58 class OverflowLNode : public OverflowNode {
  59 public:
  60   typedef TypeLong TypeClass;
  61 
  62   OverflowLNode(Node* in1, Node* in2) : OverflowNode(in1, in2) {}
  63   virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
  64   virtual const Type* Value(PhaseTransform* phase) const;
  65 
  66   virtual bool will_overflow(jlong v1, jlong v2) const = 0;
  67   virtual bool can_overflow(const Type* t1, const Type* t2) const = 0;
  68 };
  69 
  70 class OverflowAddINode : public OverflowINode {
  71 public:
  72   typedef AddINode MathOp;
  73 
  74   OverflowAddINode(Node* in1, Node* in2) : OverflowINode(in1, in2) {}
  75   virtual int Opcode() const;
  76 
  77   virtual bool will_overflow(jint v1, jint v2) const;
  78   virtual bool can_overflow(const Type* t1, const Type* t2) const;
  79 };
  80 
  81 class OverflowSubINode : public OverflowINode {
  82 public:
  83   typedef SubINode MathOp;
  84 




  31 #include "opto/subnode.hpp"
  32 #include "opto/type.hpp"
  33 
  34 class PhaseGVN;
  35 class PhaseTransform;
  36 
  37 class OverflowNode : public CmpNode {
  38 public:
  39   OverflowNode(Node* in1, Node* in2) : CmpNode(in1, in2) {}
  40 
  41   virtual uint ideal_reg() const { return Op_RegFlags; }
  42   virtual const Type* sub(const Type* t1, const Type* t2) const;
  43 };
  44 
  45 class OverflowINode : public OverflowNode {
  46 public:
  47   typedef TypeInt TypeClass;
  48 
  49   OverflowINode(Node* in1, Node* in2) : OverflowNode(in1, in2) {}
  50   virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
  51   virtual const Type* Value(PhaseGVN* phase) const;
  52 
  53   virtual bool will_overflow(jint v1, jint v2) const = 0;
  54   virtual bool can_overflow(const Type* t1, const Type* t2) const = 0;
  55 };
  56 
  57 
  58 class OverflowLNode : public OverflowNode {
  59 public:
  60   typedef TypeLong TypeClass;
  61 
  62   OverflowLNode(Node* in1, Node* in2) : OverflowNode(in1, in2) {}
  63   virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
  64   virtual const Type* Value(PhaseGVN* phase) const;
  65 
  66   virtual bool will_overflow(jlong v1, jlong v2) const = 0;
  67   virtual bool can_overflow(const Type* t1, const Type* t2) const = 0;
  68 };
  69 
  70 class OverflowAddINode : public OverflowINode {
  71 public:
  72   typedef AddINode MathOp;
  73 
  74   OverflowAddINode(Node* in1, Node* in2) : OverflowINode(in1, in2) {}
  75   virtual int Opcode() const;
  76 
  77   virtual bool will_overflow(jint v1, jint v2) const;
  78   virtual bool can_overflow(const Type* t1, const Type* t2) const;
  79 };
  80 
  81 class OverflowSubINode : public OverflowINode {
  82 public:
  83   typedef SubINode MathOp;
  84 


< prev index next >