607 }
608
609 // Returns true if the call may modify n
610 virtual bool may_modify(const TypeOopPtr *t_oop, PhaseTransform *phase);
611 // Does this node have a use of n other than in debug information?
612 bool has_non_debug_use(Node *n);
613 // Returns the unique CheckCastPP of a call
614 // or result projection is there are several CheckCastPP
615 // or returns NULL if there is no one.
616 Node *result_cast();
617 // Does this node returns pointer?
618 bool returns_pointer() const {
619 const TypeTuple *r = tf()->range();
620 return (r->cnt() > TypeFunc::Parms &&
621 r->field_at(TypeFunc::Parms)->isa_ptr());
622 }
623
624 // Collect all the interesting edges from a call for use in
625 // replacing the call by something else. Used by macro expansion
626 // and the late inlining support.
627 void extract_projections(CallProjections* projs, bool separate_io_proj);
628
629 virtual uint match_edge(uint idx) const;
630
631 #ifndef PRODUCT
632 virtual void dump_req(outputStream *st = tty) const;
633 virtual void dump_spec(outputStream *st) const;
634 #endif
635 };
636
637
638 //------------------------------CallJavaNode-----------------------------------
639 // Make a static or dynamic subroutine call node using Java calling
640 // convention. (The "Java" calling convention is the compiler's calling
641 // convention, as opposed to the interpreter's or that of native C.)
642 class CallJavaNode : public CallNode {
643 friend class VMStructs;
644 protected:
645 virtual uint cmp( const Node &n ) const;
646 virtual uint size_of() const; // Size is bigger
647
745 };
746
747 //------------------------------CallRuntimeNode--------------------------------
748 // Make a direct subroutine call node into compiled C++ code.
749 class CallRuntimeNode : public CallNode {
750 virtual uint cmp( const Node &n ) const;
751 virtual uint size_of() const; // Size is bigger
752 public:
753 CallRuntimeNode(const TypeFunc* tf, address addr, const char* name,
754 const TypePtr* adr_type)
755 : CallNode(tf, addr, adr_type),
756 _name(name)
757 {
758 init_class_id(Class_CallRuntime);
759 }
760
761 const char *_name; // Printable name, if _method is NULL
762 virtual int Opcode() const;
763 virtual void calling_convention( BasicType* sig_bt, VMRegPair *parm_regs, uint argcnt ) const;
764
765 #ifndef PRODUCT
766 virtual void dump_spec(outputStream *st) const;
767 #endif
768 };
769
770 //------------------------------CallLeafNode-----------------------------------
771 // Make a direct subroutine call node into compiled C++ code, without
772 // safepoints
773 class CallLeafNode : public CallRuntimeNode {
774 public:
775 CallLeafNode(const TypeFunc* tf, address addr, const char* name,
776 const TypePtr* adr_type)
777 : CallRuntimeNode(tf, addr, name, adr_type)
778 {
779 init_class_id(Class_CallLeaf);
780 }
781 virtual int Opcode() const;
782 virtual bool guaranteed_safepoint() { return false; }
783 #ifndef PRODUCT
784 virtual void dump_spec(outputStream *st) const;
785 #endif
786 };
787
788 //------------------------------CallLeafNoFPNode-------------------------------
789 // CallLeafNode, not using floating point or using it in the same manner as
790 // the generated code
791 class CallLeafNoFPNode : public CallLeafNode {
792 public:
793 CallLeafNoFPNode(const TypeFunc* tf, address addr, const char* name,
794 const TypePtr* adr_type)
795 : CallLeafNode(tf, addr, name, adr_type)
796 {
797 }
798 virtual int Opcode() const;
799 };
800
801
802 //------------------------------Allocate---------------------------------------
|
607 }
608
609 // Returns true if the call may modify n
610 virtual bool may_modify(const TypeOopPtr *t_oop, PhaseTransform *phase);
611 // Does this node have a use of n other than in debug information?
612 bool has_non_debug_use(Node *n);
613 // Returns the unique CheckCastPP of a call
614 // or result projection is there are several CheckCastPP
615 // or returns NULL if there is no one.
616 Node *result_cast();
617 // Does this node returns pointer?
618 bool returns_pointer() const {
619 const TypeTuple *r = tf()->range();
620 return (r->cnt() > TypeFunc::Parms &&
621 r->field_at(TypeFunc::Parms)->isa_ptr());
622 }
623
624 // Collect all the interesting edges from a call for use in
625 // replacing the call by something else. Used by macro expansion
626 // and the late inlining support.
627 void extract_projections(CallProjections* projs, bool separate_io_proj, bool do_asserts = true);
628
629 virtual uint match_edge(uint idx) const;
630
631 #ifndef PRODUCT
632 virtual void dump_req(outputStream *st = tty) const;
633 virtual void dump_spec(outputStream *st) const;
634 #endif
635 };
636
637
638 //------------------------------CallJavaNode-----------------------------------
639 // Make a static or dynamic subroutine call node using Java calling
640 // convention. (The "Java" calling convention is the compiler's calling
641 // convention, as opposed to the interpreter's or that of native C.)
642 class CallJavaNode : public CallNode {
643 friend class VMStructs;
644 protected:
645 virtual uint cmp( const Node &n ) const;
646 virtual uint size_of() const; // Size is bigger
647
745 };
746
747 //------------------------------CallRuntimeNode--------------------------------
748 // Make a direct subroutine call node into compiled C++ code.
749 class CallRuntimeNode : public CallNode {
750 virtual uint cmp( const Node &n ) const;
751 virtual uint size_of() const; // Size is bigger
752 public:
753 CallRuntimeNode(const TypeFunc* tf, address addr, const char* name,
754 const TypePtr* adr_type)
755 : CallNode(tf, addr, adr_type),
756 _name(name)
757 {
758 init_class_id(Class_CallRuntime);
759 }
760
761 const char *_name; // Printable name, if _method is NULL
762 virtual int Opcode() const;
763 virtual void calling_convention( BasicType* sig_bt, VMRegPair *parm_regs, uint argcnt ) const;
764
765 bool is_call_to_arraycopystub() const;
766
767 #ifndef PRODUCT
768 virtual void dump_spec(outputStream *st) const;
769 #endif
770 };
771
772 //------------------------------CallLeafNode-----------------------------------
773 // Make a direct subroutine call node into compiled C++ code, without
774 // safepoints
775 class CallLeafNode : public CallRuntimeNode {
776 public:
777 CallLeafNode(const TypeFunc* tf, address addr, const char* name,
778 const TypePtr* adr_type)
779 : CallRuntimeNode(tf, addr, name, adr_type)
780 {
781 init_class_id(Class_CallLeaf);
782 }
783 virtual int Opcode() const;
784 virtual bool guaranteed_safepoint() { return false; }
785 virtual bool is_g1_wb_pre_call() const { return entry_point() == CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre); }
786 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
787
788 static bool has_only_g1_wb_pre_uses(Node* n);
789
790 #ifndef PRODUCT
791 virtual void dump_spec(outputStream *st) const;
792 #endif
793 };
794
795 //------------------------------CallLeafNoFPNode-------------------------------
796 // CallLeafNode, not using floating point or using it in the same manner as
797 // the generated code
798 class CallLeafNoFPNode : public CallLeafNode {
799 public:
800 CallLeafNoFPNode(const TypeFunc* tf, address addr, const char* name,
801 const TypePtr* adr_type)
802 : CallLeafNode(tf, addr, name, adr_type)
803 {
804 }
805 virtual int Opcode() const;
806 };
807
808
809 //------------------------------Allocate---------------------------------------
|