< prev index next >

src/hotspot/share/opto/machnode.hpp

Print this page




 453     dump();
 454 #endif
 455     ShouldNotCallThis();
 456   }
 457 
 458   virtual const RegMask &in_RegMask(uint idx) const {
 459     if (idx == mach_constant_base_node_input())
 460       return MachConstantBaseNode::static_out_RegMask();
 461     return MachNode::in_RegMask(idx);
 462   }
 463 
 464   // Input edge of MachConstantBaseNode.
 465   virtual uint mach_constant_base_node_input() const { return req() - 1; }
 466 
 467   int  constant_offset();
 468   int  constant_offset() const { return ((MachConstantNode*) this)->constant_offset(); }
 469   // Unchecked version to avoid assertions in debug output.
 470   int  constant_offset_unchecked() const;
 471 };
 472 





















 473 //------------------------------MachUEPNode-----------------------------------
 474 // Machine Unvalidated Entry Point Node
 475 class MachUEPNode : public MachIdealNode {
 476 public:
 477   MachUEPNode( ) {}
 478   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;
 479   virtual uint size(PhaseRegAlloc *ra_) const;
 480 
 481 #ifndef PRODUCT
 482   virtual const char *Name() const { return "Unvalidated-Entry-Point"; }
 483   virtual void format( PhaseRegAlloc *, outputStream *st ) const;
 484 #endif
 485 };
 486 
 487 //------------------------------MachPrologNode--------------------------------
 488 // Machine function Prolog Node
 489 class MachPrologNode : public MachIdealNode {
 490 public:
 491   MachPrologNode( ) {}


 492   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;
 493   virtual uint size(PhaseRegAlloc *ra_) const;
 494   virtual int reloc() const;
 495 

 496 #ifndef PRODUCT
 497   virtual const char *Name() const { return "Prolog"; }
 498   virtual void format( PhaseRegAlloc *, outputStream *st ) const;
 499 #endif
 500 };
 501 
 502 //------------------------------MachEpilogNode--------------------------------
 503 // Machine function Epilog Node
 504 class MachEpilogNode : public MachIdealNode {
 505 public:
 506   MachEpilogNode(bool do_poll = false) : _do_polling(do_poll) {}
 507   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;
 508   virtual uint size(PhaseRegAlloc *ra_) const;
 509   virtual int reloc() const;
 510   virtual const Pipeline *pipeline() const;
 511 
 512 private:
 513   bool _do_polling;
 514 
 515 public:


 884   void set_tf(const TypeFunc* tf) { _tf = tf; }
 885   void set_entry_point(address p) { _entry_point = p; }
 886   void set_cnt(float c)           { _cnt = c; }
 887   void set_argsize(int s)         { _argsize = s; }
 888 
 889   MachCallNode() : MachSafePointNode() {
 890     init_class_id(Class_MachCall);
 891   }
 892 
 893   virtual const Type *bottom_type() const;
 894   virtual bool  pinned() const { return false; }
 895   virtual const Type* Value(PhaseGVN* phase) const;
 896   virtual const RegMask &in_RegMask(uint) const;
 897   virtual int ret_addr_offset() { return 0; }
 898 
 899   bool returns_long() const { return tf()->return_type() == T_LONG; }
 900   bool return_value_is_used() const;
 901 
 902   // Similar to cousin class CallNode::returns_pointer
 903   bool returns_pointer() const;

 904 
 905 #ifndef PRODUCT
 906   virtual void dump_spec(outputStream *st) const;
 907 #endif
 908 };
 909 
 910 //------------------------------MachCallJavaNode------------------------------
 911 // "Base" class for machine-specific versions of subroutine calls
 912 class MachCallJavaNode : public MachCallNode {
 913 protected:
 914   virtual bool cmp( const Node &n ) const;
 915   virtual uint size_of() const; // Size is bigger
 916 public:
 917   ciMethod* _method;                 // Method being direct called
 918   bool      _override_symbolic_info; // Override symbolic call site info from bytecode
 919   int       _bci;                    // Byte Code index of call byte code
 920   bool      _optimized_virtual;      // Tells if node is a static call or an optimized virtual
 921   bool      _method_handle_invoke;   // Tells if the call has to preserve SP
 922   MachCallJavaNode() : MachCallNode(), _override_symbolic_info(false) {
 923     init_class_id(Class_MachCallJava);




 453     dump();
 454 #endif
 455     ShouldNotCallThis();
 456   }
 457 
 458   virtual const RegMask &in_RegMask(uint idx) const {
 459     if (idx == mach_constant_base_node_input())
 460       return MachConstantBaseNode::static_out_RegMask();
 461     return MachNode::in_RegMask(idx);
 462   }
 463 
 464   // Input edge of MachConstantBaseNode.
 465   virtual uint mach_constant_base_node_input() const { return req() - 1; }
 466 
 467   int  constant_offset();
 468   int  constant_offset() const { return ((MachConstantNode*) this)->constant_offset(); }
 469   // Unchecked version to avoid assertions in debug output.
 470   int  constant_offset_unchecked() const;
 471 };
 472 
 473 //------------------------------MachVEPNode-----------------------------------
 474 // Machine Value Type Entry Point Node
 475 class MachVEPNode : public MachIdealNode {
 476 public:
 477   MachVEPNode(Label* verified_entry, bool verified, bool receiver_only) :
 478     _verified_entry(verified_entry),
 479     _verified(verified),
 480     _receiver_only(receiver_only) {}
 481   virtual void emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const;
 482   virtual uint size(PhaseRegAlloc* ra_) const;
 483 
 484 #ifndef PRODUCT
 485   virtual const char* Name() const { return "ValueType Entry-Point"; }
 486   virtual void format(PhaseRegAlloc*, outputStream* st) const;
 487 #endif
 488 private:
 489   Label* _verified_entry;
 490   bool   _verified;
 491   bool   _receiver_only;
 492 };
 493 
 494 //------------------------------MachUEPNode-----------------------------------
 495 // Machine Unvalidated Entry Point Node
 496 class MachUEPNode : public MachIdealNode {
 497 public:
 498   MachUEPNode( ) {}
 499   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;
 500   virtual uint size(PhaseRegAlloc *ra_) const;
 501 
 502 #ifndef PRODUCT
 503   virtual const char *Name() const { return "Unvalidated-Entry-Point"; }
 504   virtual void format( PhaseRegAlloc *, outputStream *st ) const;
 505 #endif
 506 };
 507 
 508 //------------------------------MachPrologNode--------------------------------
 509 // Machine function Prolog Node
 510 class MachPrologNode : public MachIdealNode {
 511 public:
 512   MachPrologNode(Label* verified_entry) : _verified_entry(verified_entry) {
 513     init_class_id(Class_MachProlog);
 514   }
 515   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;
 516   virtual uint size(PhaseRegAlloc *ra_) const;
 517   virtual int reloc() const;
 518 
 519   Label* _verified_entry;
 520 #ifndef PRODUCT
 521   virtual const char *Name() const { return "Prolog"; }
 522   virtual void format( PhaseRegAlloc *, outputStream *st ) const;
 523 #endif
 524 };
 525 
 526 //------------------------------MachEpilogNode--------------------------------
 527 // Machine function Epilog Node
 528 class MachEpilogNode : public MachIdealNode {
 529 public:
 530   MachEpilogNode(bool do_poll = false) : _do_polling(do_poll) {}
 531   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;
 532   virtual uint size(PhaseRegAlloc *ra_) const;
 533   virtual int reloc() const;
 534   virtual const Pipeline *pipeline() const;
 535 
 536 private:
 537   bool _do_polling;
 538 
 539 public:


 908   void set_tf(const TypeFunc* tf) { _tf = tf; }
 909   void set_entry_point(address p) { _entry_point = p; }
 910   void set_cnt(float c)           { _cnt = c; }
 911   void set_argsize(int s)         { _argsize = s; }
 912 
 913   MachCallNode() : MachSafePointNode() {
 914     init_class_id(Class_MachCall);
 915   }
 916 
 917   virtual const Type *bottom_type() const;
 918   virtual bool  pinned() const { return false; }
 919   virtual const Type* Value(PhaseGVN* phase) const;
 920   virtual const RegMask &in_RegMask(uint) const;
 921   virtual int ret_addr_offset() { return 0; }
 922 
 923   bool returns_long() const { return tf()->return_type() == T_LONG; }
 924   bool return_value_is_used() const;
 925 
 926   // Similar to cousin class CallNode::returns_pointer
 927   bool returns_pointer() const;
 928   bool returns_vt() const;
 929 
 930 #ifndef PRODUCT
 931   virtual void dump_spec(outputStream *st) const;
 932 #endif
 933 };
 934 
 935 //------------------------------MachCallJavaNode------------------------------
 936 // "Base" class for machine-specific versions of subroutine calls
 937 class MachCallJavaNode : public MachCallNode {
 938 protected:
 939   virtual bool cmp( const Node &n ) const;
 940   virtual uint size_of() const; // Size is bigger
 941 public:
 942   ciMethod* _method;                 // Method being direct called
 943   bool      _override_symbolic_info; // Override symbolic call site info from bytecode
 944   int       _bci;                    // Byte Code index of call byte code
 945   bool      _optimized_virtual;      // Tells if node is a static call or an optimized virtual
 946   bool      _method_handle_invoke;   // Tells if the call has to preserve SP
 947   MachCallJavaNode() : MachCallNode(), _override_symbolic_info(false) {
 948     init_class_id(Class_MachCallJava);


< prev index next >