< prev index next >

src/share/vm/opto/addnode.hpp

Print this page

        

*** 45,63 **** init_class_id(Class_Add); } // Handle algebraic identities here. If we have an identity, return the Node // we are equivalent to. We look for "add of zero" as an identity. ! virtual Node *Identity( PhaseTransform *phase ); // We also canonicalize the Node, moving constants to the right input, // and flatten expressions (so that 1+x+2 becomes x+3). virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); // Compute a new Type for this node. Basically we just do the pre-check, // then call the virtual add() to set the type. ! virtual const Type *Value( PhaseTransform *phase ) const; // Check if this addition involves the additive identity virtual const Type *add_of_identity( const Type *t1, const Type *t2 ) const; // Supplied function returns the sum of the inputs. --- 45,63 ---- init_class_id(Class_Add); } // Handle algebraic identities here. If we have an identity, return the Node // we are equivalent to. We look for "add of zero" as an identity. ! virtual Node* Identity(PhaseGVN* phase); // We also canonicalize the Node, moving constants to the right input, // and flatten expressions (so that 1+x+2 becomes x+3). virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); // Compute a new Type for this node. Basically we just do the pre-check, // then call the virtual add() to set the type. ! virtual const Type* Value(PhaseGVN* phase) const; // Check if this addition involves the additive identity virtual const Type *add_of_identity( const Type *t1, const Type *t2 ) const; // Supplied function returns the sum of the inputs.
*** 78,88 **** virtual int Opcode() const; virtual const Type *add_ring( const Type *, const Type * ) const; virtual const Type *add_id() const { return TypeInt::ZERO; } virtual const Type *bottom_type() const { return TypeInt::INT; } virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); ! virtual Node *Identity( PhaseTransform *phase ); virtual uint ideal_reg() const { return Op_RegI; } }; //------------------------------AddLNode--------------------------------------- // Add 2 longs --- 78,88 ---- virtual int Opcode() const; virtual const Type *add_ring( const Type *, const Type * ) const; virtual const Type *add_id() const { return TypeInt::ZERO; } virtual const Type *bottom_type() const { return TypeInt::INT; } virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); ! virtual Node* Identity(PhaseGVN* phase); virtual uint ideal_reg() const { return Op_RegI; } }; //------------------------------AddLNode--------------------------------------- // Add 2 longs
*** 92,102 **** virtual int Opcode() const; virtual const Type *add_ring( const Type *, const Type * ) const; virtual const Type *add_id() const { return TypeLong::ZERO; } virtual const Type *bottom_type() const { return TypeLong::LONG; } virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); ! virtual Node *Identity( PhaseTransform *phase ); virtual uint ideal_reg() const { return Op_RegL; } }; //------------------------------AddFNode--------------------------------------- // Add 2 floats --- 92,102 ---- virtual int Opcode() const; virtual const Type *add_ring( const Type *, const Type * ) const; virtual const Type *add_id() const { return TypeLong::ZERO; } virtual const Type *bottom_type() const { return TypeLong::LONG; } virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); ! virtual Node* Identity(PhaseGVN* phase); virtual uint ideal_reg() const { return Op_RegL; } }; //------------------------------AddFNode--------------------------------------- // Add 2 floats
*** 107,117 **** virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type *add_of_identity( const Type *t1, const Type *t2 ) const; virtual const Type *add_ring( const Type *, const Type * ) const; virtual const Type *add_id() const { return TypeF::ZERO; } virtual const Type *bottom_type() const { return Type::FLOAT; } ! virtual Node *Identity( PhaseTransform *phase ) { return this; } virtual uint ideal_reg() const { return Op_RegF; } }; //------------------------------AddDNode--------------------------------------- // Add 2 doubles --- 107,117 ---- virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type *add_of_identity( const Type *t1, const Type *t2 ) const; virtual const Type *add_ring( const Type *, const Type * ) const; virtual const Type *add_id() const { return TypeF::ZERO; } virtual const Type *bottom_type() const { return Type::FLOAT; } ! virtual Node* Identity(PhaseGVN* phase) { return this; } virtual uint ideal_reg() const { return Op_RegF; } }; //------------------------------AddDNode--------------------------------------- // Add 2 doubles
*** 122,132 **** virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type *add_of_identity( const Type *t1, const Type *t2 ) const; virtual const Type *add_ring( const Type *, const Type * ) const; virtual const Type *add_id() const { return TypeD::ZERO; } virtual const Type *bottom_type() const { return Type::DOUBLE; } ! virtual Node *Identity( PhaseTransform *phase ) { return this; } virtual uint ideal_reg() const { return Op_RegD; } }; //------------------------------AddPNode--------------------------------------- // Add pointer plus integer to get pointer. NOT commutative, really. --- 122,132 ---- virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual const Type *add_of_identity( const Type *t1, const Type *t2 ) const; virtual const Type *add_ring( const Type *, const Type * ) const; virtual const Type *add_id() const { return TypeD::ZERO; } virtual const Type *bottom_type() const { return Type::DOUBLE; } ! virtual Node* Identity(PhaseGVN* phase) { return this; } virtual uint ideal_reg() const { return Op_RegD; } }; //------------------------------AddPNode--------------------------------------- // Add pointer plus integer to get pointer. NOT commutative, really.
*** 140,152 **** Offset } ; // Offset added to address AddPNode( Node *base, Node *ptr, Node *off ) : Node(0,base,ptr,off) { init_class_id(Class_AddP); } virtual int Opcode() const; ! virtual Node *Identity( PhaseTransform *phase ); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); ! virtual const Type *Value( PhaseTransform *phase ) const; virtual const Type *bottom_type() const; virtual uint ideal_reg() const { return Op_RegP; } Node *base_node() { assert( req() > Base, "Missing base"); return in(Base); } static Node* Ideal_base_and_offset(Node* ptr, PhaseTransform* phase, // second return value: --- 140,152 ---- Offset } ; // Offset added to address AddPNode( Node *base, Node *ptr, Node *off ) : Node(0,base,ptr,off) { init_class_id(Class_AddP); } virtual int Opcode() const; ! virtual Node* Identity(PhaseGVN* phase); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); ! virtual const Type* Value(PhaseGVN* phase) const; virtual const Type *bottom_type() const; virtual uint ideal_reg() const { return Op_RegP; } Node *base_node() { assert( req() > Base, "Missing base"); return in(Base); } static Node* Ideal_base_and_offset(Node* ptr, PhaseTransform* phase, // second return value:
*** 168,178 **** OrINode( Node *in1, Node *in2 ) : AddNode(in1,in2) {} virtual int Opcode() const; virtual const Type *add_ring( const Type *, const Type * ) const; virtual const Type *add_id() const { return TypeInt::ZERO; } virtual const Type *bottom_type() const { return TypeInt::INT; } ! virtual Node *Identity( PhaseTransform *phase ); virtual uint ideal_reg() const { return Op_RegI; } }; //------------------------------OrLNode---------------------------------------- // Logically OR 2 longs. Included with the ADD nodes because it inherits --- 168,178 ---- OrINode( Node *in1, Node *in2 ) : AddNode(in1,in2) {} virtual int Opcode() const; virtual const Type *add_ring( const Type *, const Type * ) const; virtual const Type *add_id() const { return TypeInt::ZERO; } virtual const Type *bottom_type() const { return TypeInt::INT; } ! virtual Node* Identity(PhaseGVN* phase); virtual uint ideal_reg() const { return Op_RegI; } }; //------------------------------OrLNode---------------------------------------- // Logically OR 2 longs. Included with the ADD nodes because it inherits
*** 182,192 **** OrLNode( Node *in1, Node *in2 ) : AddNode(in1,in2) {} virtual int Opcode() const; virtual const Type *add_ring( const Type *, const Type * ) const; virtual const Type *add_id() const { return TypeLong::ZERO; } virtual const Type *bottom_type() const { return TypeLong::LONG; } ! virtual Node *Identity( PhaseTransform *phase ); virtual uint ideal_reg() const { return Op_RegL; } }; //------------------------------XorINode--------------------------------------- // XOR'ing 2 integers --- 182,192 ---- OrLNode( Node *in1, Node *in2 ) : AddNode(in1,in2) {} virtual int Opcode() const; virtual const Type *add_ring( const Type *, const Type * ) const; virtual const Type *add_id() const { return TypeLong::ZERO; } virtual const Type *bottom_type() const { return TypeLong::LONG; } ! virtual Node* Identity(PhaseGVN* phase); virtual uint ideal_reg() const { return Op_RegL; } }; //------------------------------XorINode--------------------------------------- // XOR'ing 2 integers
< prev index next >