232 virtual const Type *add_ring( const Type *, const Type * ) const; 233 virtual const Type *add_id() const { return TypeInt::make(min_jint); } 234 virtual const Type *bottom_type() const { return TypeInt::INT; } 235 virtual uint ideal_reg() const { return Op_RegI; } 236 }; 237 238 //------------------------------MinINode--------------------------------------- 239 // MINimum of 2 integers. Included with the ADD nodes because it inherits 240 // all the behavior of addition on a ring. 241 class MinINode : public MaxNode { 242 public: 243 MinINode( Node *in1, Node *in2 ) : MaxNode(in1,in2) {} 244 virtual int Opcode() const; 245 virtual const Type *add_ring( const Type *, const Type * ) const; 246 virtual const Type *add_id() const { return TypeInt::make(max_jint); } 247 virtual const Type *bottom_type() const { return TypeInt::INT; } 248 virtual uint ideal_reg() const { return Op_RegI; } 249 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); 250 }; 251 252 //------------------------------MaxFNode--------------------------------------- 253 // Maximum of 2 floats. 254 class MaxFNode : public MaxNode { 255 public: 256 MaxFNode(Node *in1, Node *in2) : MaxNode(in1, in2) {} 257 virtual int Opcode() const; 258 virtual const Type *add_ring(const Type*, const Type*) const; 259 virtual const Type *add_id() const { return TypeF::NEG_INF; } 260 virtual const Type *bottom_type() const { return Type::FLOAT; } 261 virtual uint ideal_reg() const { return Op_RegF; } 262 }; 263 264 //------------------------------MinFNode--------------------------------------- 265 // Minimum of 2 floats. 266 class MinFNode : public MaxNode { 267 public: 268 MinFNode(Node *in1, Node *in2) : MaxNode(in1, in2) {} 269 virtual int Opcode() const; 270 virtual const Type *add_ring(const Type*, const Type*) const; 271 virtual const Type *add_id() const { return TypeF::POS_INF; } | 232 virtual const Type *add_ring( const Type *, const Type * ) const; 233 virtual const Type *add_id() const { return TypeInt::make(min_jint); } 234 virtual const Type *bottom_type() const { return TypeInt::INT; } 235 virtual uint ideal_reg() const { return Op_RegI; } 236 }; 237 238 //------------------------------MinINode--------------------------------------- 239 // MINimum of 2 integers. Included with the ADD nodes because it inherits 240 // all the behavior of addition on a ring. 241 class MinINode : public MaxNode { 242 public: 243 MinINode( Node *in1, Node *in2 ) : MaxNode(in1,in2) {} 244 virtual int Opcode() const; 245 virtual const Type *add_ring( const Type *, const Type * ) const; 246 virtual const Type *add_id() const { return TypeInt::make(max_jint); } 247 virtual const Type *bottom_type() const { return TypeInt::INT; } 248 virtual uint ideal_reg() const { return Op_RegI; } 249 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); 250 }; 251 252 //------------------------------MaxLNode--------------------------------------- 253 // MAXimum of 2 longs. 254 class MaxLNode : public MaxNode { 255 public: 256 MaxLNode(Node *in1, Node *in2) : MaxNode(in1, in2) {} 257 virtual int Opcode() const; 258 virtual const Type *add_ring(const Type*, const Type*) const { return TypeLong::LONG; } 259 virtual const Type *add_id() const { return TypeLong::make(min_jlong); } 260 virtual const Type *bottom_type() const { return TypeLong::LONG; } 261 virtual uint ideal_reg() const { return Op_RegL; } 262 }; 263 264 //------------------------------MinLNode--------------------------------------- 265 // MINimum of 2 longs. 266 class MinLNode : public MaxNode { 267 public: 268 MinLNode(Node *in1, Node *in2) : MaxNode(in1, in2) {} 269 virtual int Opcode() const; 270 virtual const Type *add_ring(const Type*, const Type*) const { return TypeLong::LONG; } 271 virtual const Type *add_id() const { return TypeLong::make(max_jlong); } 272 virtual const Type *bottom_type() const { return TypeLong::LONG; } 273 virtual uint ideal_reg() const { return Op_RegL; } 274 }; 275 276 //------------------------------MaxFNode--------------------------------------- 277 // Maximum of 2 floats. 278 class MaxFNode : public MaxNode { 279 public: 280 MaxFNode(Node *in1, Node *in2) : MaxNode(in1, in2) {} 281 virtual int Opcode() const; 282 virtual const Type *add_ring(const Type*, const Type*) const; 283 virtual const Type *add_id() const { return TypeF::NEG_INF; } 284 virtual const Type *bottom_type() const { return Type::FLOAT; } 285 virtual uint ideal_reg() const { return Op_RegF; } 286 }; 287 288 //------------------------------MinFNode--------------------------------------- 289 // Minimum of 2 floats. 290 class MinFNode : public MaxNode { 291 public: 292 MinFNode(Node *in1, Node *in2) : MaxNode(in1, in2) {} 293 virtual int Opcode() const; 294 virtual const Type *add_ring(const Type*, const Type*) const; 295 virtual const Type *add_id() const { return TypeF::POS_INF; } |