comparison src/share/vm/opto/subnode.hpp @ 8076:c59b7900a2bd

8007959: Use expensive node logic for more math nodes Summary: use expensive node logic for other more math nodes. Reviewed-by: kvn
author roland
date Mon, 18 Feb 2013 09:06:24 +0100
parents 8b3da8d14c93
children c9ccd7b85f20
comparison
equal deleted inserted replaced
8056:57b81d6c3641 8076:c59b7900a2bd
397 397
398 //------------------------------CosDNode--------------------------------------- 398 //------------------------------CosDNode---------------------------------------
399 // Cosinus of a double 399 // Cosinus of a double
400 class CosDNode : public Node { 400 class CosDNode : public Node {
401 public: 401 public:
402 CosDNode( Node *in1 ) : Node(0, in1) {} 402 CosDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
403 init_flags(Flag_is_expensive);
404 C->add_expensive_node(this);
405 }
403 virtual int Opcode() const; 406 virtual int Opcode() const;
404 const Type *bottom_type() const { return Type::DOUBLE; } 407 const Type *bottom_type() const { return Type::DOUBLE; }
405 virtual uint ideal_reg() const { return Op_RegD; } 408 virtual uint ideal_reg() const { return Op_RegD; }
406 virtual const Type *Value( PhaseTransform *phase ) const; 409 virtual const Type *Value( PhaseTransform *phase ) const;
407 }; 410 };
408 411
409 //------------------------------CosDNode--------------------------------------- 412 //------------------------------CosDNode---------------------------------------
410 // Sinus of a double 413 // Sinus of a double
411 class SinDNode : public Node { 414 class SinDNode : public Node {
412 public: 415 public:
413 SinDNode( Node *in1 ) : Node(0, in1) {} 416 SinDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
417 init_flags(Flag_is_expensive);
418 C->add_expensive_node(this);
419 }
414 virtual int Opcode() const; 420 virtual int Opcode() const;
415 const Type *bottom_type() const { return Type::DOUBLE; } 421 const Type *bottom_type() const { return Type::DOUBLE; }
416 virtual uint ideal_reg() const { return Op_RegD; } 422 virtual uint ideal_reg() const { return Op_RegD; }
417 virtual const Type *Value( PhaseTransform *phase ) const; 423 virtual const Type *Value( PhaseTransform *phase ) const;
418 }; 424 };
420 426
421 //------------------------------TanDNode--------------------------------------- 427 //------------------------------TanDNode---------------------------------------
422 // tangens of a double 428 // tangens of a double
423 class TanDNode : public Node { 429 class TanDNode : public Node {
424 public: 430 public:
425 TanDNode(Node *in1 ) : Node(0, in1) {} 431 TanDNode(Compile* C, Node *c,Node *in1) : Node(c, in1) {
432 init_flags(Flag_is_expensive);
433 C->add_expensive_node(this);
434 }
426 virtual int Opcode() const; 435 virtual int Opcode() const;
427 const Type *bottom_type() const { return Type::DOUBLE; } 436 const Type *bottom_type() const { return Type::DOUBLE; }
428 virtual uint ideal_reg() const { return Op_RegD; } 437 virtual uint ideal_reg() const { return Op_RegD; }
429 virtual const Type *Value( PhaseTransform *phase ) const; 438 virtual const Type *Value( PhaseTransform *phase ) const;
430 }; 439 };
443 452
444 //------------------------------SqrtDNode-------------------------------------- 453 //------------------------------SqrtDNode--------------------------------------
445 // square root a double 454 // square root a double
446 class SqrtDNode : public Node { 455 class SqrtDNode : public Node {
447 public: 456 public:
448 SqrtDNode(Node *c, Node *in1 ) : Node(c, in1) {} 457 SqrtDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
458 init_flags(Flag_is_expensive);
459 C->add_expensive_node(this);
460 }
449 virtual int Opcode() const; 461 virtual int Opcode() const;
450 const Type *bottom_type() const { return Type::DOUBLE; } 462 const Type *bottom_type() const { return Type::DOUBLE; }
451 virtual uint ideal_reg() const { return Op_RegD; } 463 virtual uint ideal_reg() const { return Op_RegD; }
452 virtual const Type *Value( PhaseTransform *phase ) const; 464 virtual const Type *Value( PhaseTransform *phase ) const;
453 }; 465 };
468 480
469 //------------------------------LogDNode--------------------------------------- 481 //------------------------------LogDNode---------------------------------------
470 // Log_e of a double 482 // Log_e of a double
471 class LogDNode : public Node { 483 class LogDNode : public Node {
472 public: 484 public:
473 LogDNode( Node *in1 ) : Node(0, in1) {} 485 LogDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
486 init_flags(Flag_is_expensive);
487 C->add_expensive_node(this);
488 }
474 virtual int Opcode() const; 489 virtual int Opcode() const;
475 const Type *bottom_type() const { return Type::DOUBLE; } 490 const Type *bottom_type() const { return Type::DOUBLE; }
476 virtual uint ideal_reg() const { return Op_RegD; } 491 virtual uint ideal_reg() const { return Op_RegD; }
477 virtual const Type *Value( PhaseTransform *phase ) const; 492 virtual const Type *Value( PhaseTransform *phase ) const;
478 }; 493 };
479 494
480 //------------------------------Log10DNode--------------------------------------- 495 //------------------------------Log10DNode---------------------------------------
481 // Log_10 of a double 496 // Log_10 of a double
482 class Log10DNode : public Node { 497 class Log10DNode : public Node {
483 public: 498 public:
484 Log10DNode( Node *in1 ) : Node(0, in1) {} 499 Log10DNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
500 init_flags(Flag_is_expensive);
501 C->add_expensive_node(this);
502 }
485 virtual int Opcode() const; 503 virtual int Opcode() const;
486 const Type *bottom_type() const { return Type::DOUBLE; } 504 const Type *bottom_type() const { return Type::DOUBLE; }
487 virtual uint ideal_reg() const { return Op_RegD; } 505 virtual uint ideal_reg() const { return Op_RegD; }
488 virtual const Type *Value( PhaseTransform *phase ) const; 506 virtual const Type *Value( PhaseTransform *phase ) const;
489 }; 507 };