< prev index next >

src/share/vm/opto/mulnode.hpp

Print this page

        

*** 68,153 **** // Supplied function to return the additive identity type virtual const Type *add_id() const = 0; // Supplied function to return the additive opcode ! virtual int add_opcode() const = 0; // Supplied function to return the multiplicative opcode ! virtual int mul_opcode() const = 0; }; //------------------------------MulINode--------------------------------------- // Multiply 2 integers class MulINode : public MulNode { public: MulINode( Node *in1, Node *in2 ) : MulNode(in1,in2) {} ! virtual int Opcode() const; virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type *mul_ring( const Type *, const Type * ) const; const Type *mul_id() const { return TypeInt::ONE; } const Type *add_id() const { return TypeInt::ZERO; } ! int add_opcode() const { return Op_AddI; } ! int mul_opcode() const { return Op_MulI; } const Type *bottom_type() const { return TypeInt::INT; } virtual uint ideal_reg() const { return Op_RegI; } }; //------------------------------MulLNode--------------------------------------- // Multiply 2 longs class MulLNode : public MulNode { public: MulLNode( Node *in1, Node *in2 ) : MulNode(in1,in2) {} ! virtual int Opcode() const; virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type *mul_ring( const Type *, const Type * ) const; const Type *mul_id() const { return TypeLong::ONE; } const Type *add_id() const { return TypeLong::ZERO; } ! int add_opcode() const { return Op_AddL; } ! int mul_opcode() const { return Op_MulL; } const Type *bottom_type() const { return TypeLong::LONG; } virtual uint ideal_reg() const { return Op_RegL; } }; //------------------------------MulFNode--------------------------------------- // Multiply 2 floats class MulFNode : public MulNode { public: MulFNode( Node *in1, Node *in2 ) : MulNode(in1,in2) {} ! virtual int Opcode() const; virtual const Type *mul_ring( const Type *, const Type * ) const; const Type *mul_id() const { return TypeF::ONE; } const Type *add_id() const { return TypeF::ZERO; } ! int add_opcode() const { return Op_AddF; } ! int mul_opcode() const { return Op_MulF; } const Type *bottom_type() const { return Type::FLOAT; } virtual uint ideal_reg() const { return Op_RegF; } }; //------------------------------MulDNode--------------------------------------- // Multiply 2 doubles class MulDNode : public MulNode { public: MulDNode( Node *in1, Node *in2 ) : MulNode(in1,in2) {} ! virtual int Opcode() const; virtual const Type *mul_ring( const Type *, const Type * ) const; const Type *mul_id() const { return TypeD::ONE; } const Type *add_id() const { return TypeD::ZERO; } ! int add_opcode() const { return Op_AddD; } ! int mul_opcode() const { return Op_MulD; } const Type *bottom_type() const { return Type::DOUBLE; } virtual uint ideal_reg() const { return Op_RegD; } }; //-------------------------------MulHiLNode------------------------------------ // Upper 64 bits of a 64 bit by 64 bit multiply class MulHiLNode : public Node { public: MulHiLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {} ! virtual int Opcode() const; virtual const Type* Value(PhaseGVN* phase) const; const Type *bottom_type() const { return TypeLong::LONG; } virtual uint ideal_reg() const { return Op_RegL; } }; --- 68,153 ---- // Supplied function to return the additive identity type virtual const Type *add_id() const = 0; // Supplied function to return the additive opcode ! virtual uint add_opcode() const = 0; // Supplied function to return the multiplicative opcode ! virtual uint mul_opcode() const = 0; }; //------------------------------MulINode--------------------------------------- // Multiply 2 integers class MulINode : public MulNode { public: MulINode( Node *in1, Node *in2 ) : MulNode(in1,in2) {} ! virtual uint Opcode() const; virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type *mul_ring( const Type *, const Type * ) const; const Type *mul_id() const { return TypeInt::ONE; } const Type *add_id() const { return TypeInt::ZERO; } ! uint add_opcode() const { return Op_AddI; } ! uint mul_opcode() const { return Op_MulI; } const Type *bottom_type() const { return TypeInt::INT; } virtual uint ideal_reg() const { return Op_RegI; } }; //------------------------------MulLNode--------------------------------------- // Multiply 2 longs class MulLNode : public MulNode { public: MulLNode( Node *in1, Node *in2 ) : MulNode(in1,in2) {} ! virtual uint Opcode() const; virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type *mul_ring( const Type *, const Type * ) const; const Type *mul_id() const { return TypeLong::ONE; } const Type *add_id() const { return TypeLong::ZERO; } ! uint add_opcode() const { return Op_AddL; } ! uint mul_opcode() const { return Op_MulL; } const Type *bottom_type() const { return TypeLong::LONG; } virtual uint ideal_reg() const { return Op_RegL; } }; //------------------------------MulFNode--------------------------------------- // Multiply 2 floats class MulFNode : public MulNode { public: MulFNode( Node *in1, Node *in2 ) : MulNode(in1,in2) {} ! virtual uint Opcode() const; virtual const Type *mul_ring( const Type *, const Type * ) const; const Type *mul_id() const { return TypeF::ONE; } const Type *add_id() const { return TypeF::ZERO; } ! uint add_opcode() const { return Op_AddF; } ! uint mul_opcode() const { return Op_MulF; } const Type *bottom_type() const { return Type::FLOAT; } virtual uint ideal_reg() const { return Op_RegF; } }; //------------------------------MulDNode--------------------------------------- // Multiply 2 doubles class MulDNode : public MulNode { public: MulDNode( Node *in1, Node *in2 ) : MulNode(in1,in2) {} ! virtual uint Opcode() const; virtual const Type *mul_ring( const Type *, const Type * ) const; const Type *mul_id() const { return TypeD::ONE; } const Type *add_id() const { return TypeD::ZERO; } ! uint add_opcode() const { return Op_AddD; } ! uint mul_opcode() const { return Op_MulD; } const Type *bottom_type() const { return Type::DOUBLE; } virtual uint ideal_reg() const { return Op_RegD; } }; //-------------------------------MulHiLNode------------------------------------ // Upper 64 bits of a 64 bit by 64 bit multiply class MulHiLNode : public Node { public: MulHiLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {} ! virtual uint Opcode() const; virtual const Type* Value(PhaseGVN* phase) const; const Type *bottom_type() const { return TypeLong::LONG; } virtual uint ideal_reg() const { return Op_RegL; } };
*** 155,198 **** // Logically AND 2 integers. Included with the MUL nodes because it inherits // all the behavior of multiplication on a ring. class AndINode : public MulINode { public: AndINode( Node *in1, Node *in2 ) : MulINode(in1,in2) {} ! virtual int Opcode() const; virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual Node* Identity(PhaseGVN* phase); virtual const Type *mul_ring( const Type *, const Type * ) const; const Type *mul_id() const { return TypeInt::MINUS_1; } const Type *add_id() const { return TypeInt::ZERO; } ! int add_opcode() const { return Op_OrI; } ! int mul_opcode() const { return Op_AndI; } virtual uint ideal_reg() const { return Op_RegI; } }; //------------------------------AndINode--------------------------------------- // Logically AND 2 longs. Included with the MUL nodes because it inherits // all the behavior of multiplication on a ring. class AndLNode : public MulLNode { public: AndLNode( Node *in1, Node *in2 ) : MulLNode(in1,in2) {} ! virtual int Opcode() const; virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual Node* Identity(PhaseGVN* phase); virtual const Type *mul_ring( const Type *, const Type * ) const; const Type *mul_id() const { return TypeLong::MINUS_1; } const Type *add_id() const { return TypeLong::ZERO; } ! int add_opcode() const { return Op_OrL; } ! int mul_opcode() const { return Op_AndL; } virtual uint ideal_reg() const { return Op_RegL; } }; //------------------------------LShiftINode------------------------------------ // Logical shift left class LShiftINode : public Node { public: LShiftINode( Node *in1, Node *in2 ) : Node(0,in1,in2) {} ! virtual int Opcode() const; virtual Node* Identity(PhaseGVN* phase); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type* Value(PhaseGVN* phase) const; const Type *bottom_type() const { return TypeInt::INT; } virtual uint ideal_reg() const { return Op_RegI; } --- 155,198 ---- // Logically AND 2 integers. Included with the MUL nodes because it inherits // all the behavior of multiplication on a ring. class AndINode : public MulINode { public: AndINode( Node *in1, Node *in2 ) : MulINode(in1,in2) {} ! virtual uint Opcode() const; virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual Node* Identity(PhaseGVN* phase); virtual const Type *mul_ring( const Type *, const Type * ) const; const Type *mul_id() const { return TypeInt::MINUS_1; } const Type *add_id() const { return TypeInt::ZERO; } ! uint add_opcode() const { return Op_OrI; } ! uint mul_opcode() const { return Op_AndI; } virtual uint ideal_reg() const { return Op_RegI; } }; //------------------------------AndINode--------------------------------------- // Logically AND 2 longs. Included with the MUL nodes because it inherits // all the behavior of multiplication on a ring. class AndLNode : public MulLNode { public: AndLNode( Node *in1, Node *in2 ) : MulLNode(in1,in2) {} ! virtual uint Opcode() const; virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual Node* Identity(PhaseGVN* phase); virtual const Type *mul_ring( const Type *, const Type * ) const; const Type *mul_id() const { return TypeLong::MINUS_1; } const Type *add_id() const { return TypeLong::ZERO; } ! uint add_opcode() const { return Op_OrL; } ! uint mul_opcode() const { return Op_AndL; } virtual uint ideal_reg() const { return Op_RegL; } }; //------------------------------LShiftINode------------------------------------ // Logical shift left class LShiftINode : public Node { public: LShiftINode( Node *in1, Node *in2 ) : Node(0,in1,in2) {} ! virtual uint Opcode() const; virtual Node* Identity(PhaseGVN* phase); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type* Value(PhaseGVN* phase) const; const Type *bottom_type() const { return TypeInt::INT; } virtual uint ideal_reg() const { return Op_RegI; }
*** 201,211 **** //------------------------------LShiftLNode------------------------------------ // Logical shift left class LShiftLNode : public Node { public: LShiftLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {} ! virtual int Opcode() const; virtual Node* Identity(PhaseGVN* phase); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type* Value(PhaseGVN* phase) const; const Type *bottom_type() const { return TypeLong::LONG; } virtual uint ideal_reg() const { return Op_RegL; } --- 201,211 ---- //------------------------------LShiftLNode------------------------------------ // Logical shift left class LShiftLNode : public Node { public: LShiftLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {} ! virtual uint Opcode() const; virtual Node* Identity(PhaseGVN* phase); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type* Value(PhaseGVN* phase) const; const Type *bottom_type() const { return TypeLong::LONG; } virtual uint ideal_reg() const { return Op_RegL; }
*** 214,224 **** //------------------------------RShiftINode------------------------------------ // Signed shift right class RShiftINode : public Node { public: RShiftINode( Node *in1, Node *in2 ) : Node(0,in1,in2) {} ! virtual int Opcode() const; virtual Node* Identity(PhaseGVN* phase); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type* Value(PhaseGVN* phase) const; const Type *bottom_type() const { return TypeInt::INT; } virtual uint ideal_reg() const { return Op_RegI; } --- 214,224 ---- //------------------------------RShiftINode------------------------------------ // Signed shift right class RShiftINode : public Node { public: RShiftINode( Node *in1, Node *in2 ) : Node(0,in1,in2) {} ! virtual uint Opcode() const; virtual Node* Identity(PhaseGVN* phase); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type* Value(PhaseGVN* phase) const; const Type *bottom_type() const { return TypeInt::INT; } virtual uint ideal_reg() const { return Op_RegI; }
*** 227,237 **** //------------------------------RShiftLNode------------------------------------ // Signed shift right class RShiftLNode : public Node { public: RShiftLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {} ! virtual int Opcode() const; virtual Node* Identity(PhaseGVN* phase); virtual const Type* Value(PhaseGVN* phase) const; const Type *bottom_type() const { return TypeLong::LONG; } virtual uint ideal_reg() const { return Op_RegL; } }; --- 227,237 ---- //------------------------------RShiftLNode------------------------------------ // Signed shift right class RShiftLNode : public Node { public: RShiftLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {} ! virtual uint Opcode() const; virtual Node* Identity(PhaseGVN* phase); virtual const Type* Value(PhaseGVN* phase) const; const Type *bottom_type() const { return TypeLong::LONG; } virtual uint ideal_reg() const { return Op_RegL; } };
*** 240,250 **** //------------------------------URShiftINode----------------------------------- // Logical shift right class URShiftINode : public Node { public: URShiftINode( Node *in1, Node *in2 ) : Node(0,in1,in2) {} ! virtual int Opcode() const; virtual Node* Identity(PhaseGVN* phase); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type* Value(PhaseGVN* phase) const; const Type *bottom_type() const { return TypeInt::INT; } virtual uint ideal_reg() const { return Op_RegI; } --- 240,250 ---- //------------------------------URShiftINode----------------------------------- // Logical shift right class URShiftINode : public Node { public: URShiftINode( Node *in1, Node *in2 ) : Node(0,in1,in2) {} ! virtual uint Opcode() const; virtual Node* Identity(PhaseGVN* phase); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type* Value(PhaseGVN* phase) const; const Type *bottom_type() const { return TypeInt::INT; } virtual uint ideal_reg() const { return Op_RegI; }
*** 253,263 **** //------------------------------URShiftLNode----------------------------------- // Logical shift right class URShiftLNode : public Node { public: URShiftLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {} ! virtual int Opcode() const; virtual Node* Identity(PhaseGVN* phase); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type* Value(PhaseGVN* phase) const; const Type *bottom_type() const { return TypeLong::LONG; } virtual uint ideal_reg() const { return Op_RegL; } --- 253,263 ---- //------------------------------URShiftLNode----------------------------------- // Logical shift right class URShiftLNode : public Node { public: URShiftLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {} ! virtual uint Opcode() const; virtual Node* Identity(PhaseGVN* phase); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type* Value(PhaseGVN* phase) const; const Type *bottom_type() const { return TypeLong::LONG; } virtual uint ideal_reg() const { return Op_RegL; }
< prev index next >