625 // value-numbering, most Ideal calls or Identity functions. This Node is
626 // specifically designed to prevent the pre-increment value of a loop trip
627 // counter from being live out of the bottom of the loop (hence causing the
628 // pre- and post-increment values both being live and thus requiring an extra
629 // temp register and an extra move). If we "accidentally" optimize through
630 // this kind of a Node, we'll get slightly pessimal, but correct, code. Thus
631 // it's OK to be slightly sloppy on optimizations here.
632 class Opaque2Node : public Node {
633 virtual uint hash() const ; // { return NO_HASH; }
634 virtual uint cmp( const Node &n ) const;
635 public:
636 Opaque2Node( Compile* C, Node *n ) : Node(0,n) {
637 // Put it on the Macro nodes list to removed during macro nodes expansion.
638 init_flags(Flag_is_macro);
639 C->add_macro_node(this);
640 }
641 virtual int Opcode() const;
642 virtual const Type *bottom_type() const { return TypeInt::INT; }
643 };
644
645 //----------------------PartialSubtypeCheckNode--------------------------------
646 // The 2nd slow-half of a subtype check. Scan the subklass's 2ndary superklass
647 // array for an instance of the superklass. Set a hidden internal cache on a
648 // hit (cache is checked with exposed code in gen_subtype_check()). Return
649 // not zero for a miss or zero for a hit.
650 class PartialSubtypeCheckNode : public Node {
651 public:
652 PartialSubtypeCheckNode(Node* c, Node* sub, Node* super) : Node(c,sub,super) {}
653 virtual int Opcode() const;
654 virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM; }
655 virtual uint ideal_reg() const { return Op_RegP; }
656 };
657
658 //
659 class MoveI2FNode : public Node {
660 public:
661 MoveI2FNode( Node *value ) : Node(0,value) {}
662 virtual int Opcode() const;
663 virtual const Type *bottom_type() const { return Type::FLOAT; }
664 virtual uint ideal_reg() const { return Op_RegF; }
|
625 // value-numbering, most Ideal calls or Identity functions. This Node is
626 // specifically designed to prevent the pre-increment value of a loop trip
627 // counter from being live out of the bottom of the loop (hence causing the
628 // pre- and post-increment values both being live and thus requiring an extra
629 // temp register and an extra move). If we "accidentally" optimize through
630 // this kind of a Node, we'll get slightly pessimal, but correct, code. Thus
631 // it's OK to be slightly sloppy on optimizations here.
632 class Opaque2Node : public Node {
633 virtual uint hash() const ; // { return NO_HASH; }
634 virtual uint cmp( const Node &n ) const;
635 public:
636 Opaque2Node( Compile* C, Node *n ) : Node(0,n) {
637 // Put it on the Macro nodes list to removed during macro nodes expansion.
638 init_flags(Flag_is_macro);
639 C->add_macro_node(this);
640 }
641 virtual int Opcode() const;
642 virtual const Type *bottom_type() const { return TypeInt::INT; }
643 };
644
645 //------------------------------Opaque3Node------------------------------------
646 // A node to prevent unwanted optimizations. Will be optimized only during
647 // macro nodes expansion.
648 class Opaque3Node : public Opaque2Node {
649 int _opt; // what optimization it was used for
650 public:
651 enum { RTM_OPT };
652 Opaque3Node(Compile* C, Node *n, int opt) : Opaque2Node(C, n), _opt(opt) {}
653 virtual int Opcode() const;
654 bool rtm_opt() const { return (_opt == RTM_OPT); }
655 };
656
657
658 //----------------------PartialSubtypeCheckNode--------------------------------
659 // The 2nd slow-half of a subtype check. Scan the subklass's 2ndary superklass
660 // array for an instance of the superklass. Set a hidden internal cache on a
661 // hit (cache is checked with exposed code in gen_subtype_check()). Return
662 // not zero for a miss or zero for a hit.
663 class PartialSubtypeCheckNode : public Node {
664 public:
665 PartialSubtypeCheckNode(Node* c, Node* sub, Node* super) : Node(c,sub,super) {}
666 virtual int Opcode() const;
667 virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM; }
668 virtual uint ideal_reg() const { return Op_RegP; }
669 };
670
671 //
672 class MoveI2FNode : public Node {
673 public:
674 MoveI2FNode( Node *value ) : Node(0,value) {}
675 virtual int Opcode() const;
676 virtual const Type *bottom_type() const { return Type::FLOAT; }
677 virtual uint ideal_reg() const { return Op_RegF; }
|