< prev index next >

src/hotspot/share/opto/machnode.hpp

Print this page

  35 
  36 class BufferBlob;
  37 class CodeBuffer;
  38 class JVMState;
  39 class MachCallDynamicJavaNode;
  40 class MachCallJavaNode;
  41 class MachCallLeafNode;
  42 class MachCallNativeNode;
  43 class MachCallNode;
  44 class MachCallRuntimeNode;
  45 class MachCallStaticJavaNode;
  46 class MachEpilogNode;
  47 class MachIfNode;
  48 class MachNullCheckNode;
  49 class MachOper;
  50 class MachProjNode;
  51 class MachPrologNode;
  52 class MachReturnNode;
  53 class MachSafePointNode;
  54 class MachSpillCopyNode;

  55 class Matcher;
  56 class PhaseRegAlloc;
  57 class RegMask;
  58 class RTMLockingCounters;
  59 class State;
  60 
  61 //---------------------------MachOper------------------------------------------
  62 class MachOper : public ResourceObj {
  63 public:
  64   // Allocate right next to the MachNodes in the same arena
  65   void *operator new(size_t x) throw() {
  66     Compile* C = Compile::current();
  67     return C->node_arena()->AmallocWords(x);
  68   }
  69 
  70   // Opcode
  71   virtual uint opcode() const = 0;
  72 
  73   // Number of input edges.
  74   // Generally at least 1

 473     dump();
 474 #endif
 475     ShouldNotCallThis();
 476   }
 477 
 478   virtual const RegMask &in_RegMask(uint idx) const {
 479     if (idx == mach_constant_base_node_input())
 480       return MachConstantBaseNode::static_out_RegMask();
 481     return MachNode::in_RegMask(idx);
 482   }
 483 
 484   // Input edge of MachConstantBaseNode.
 485   virtual uint mach_constant_base_node_input() const { return req() - 1; }
 486 
 487   int  constant_offset();
 488   int  constant_offset() const { return ((MachConstantNode*) this)->constant_offset(); }
 489   // Unchecked version to avoid assertions in debug output.
 490   int  constant_offset_unchecked() const;
 491 };
 492 






























 493 //------------------------------MachUEPNode-----------------------------------
 494 // Machine Unvalidated Entry Point Node
 495 class MachUEPNode : public MachIdealNode {
 496 public:
 497   MachUEPNode( ) {}
 498   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;
 499   virtual uint size(PhaseRegAlloc *ra_) const;
 500 
 501 #ifndef PRODUCT
 502   virtual const char *Name() const { return "Unvalidated-Entry-Point"; }
 503   virtual void format( PhaseRegAlloc *, outputStream *st ) const;
 504 #endif
 505 };
 506 
 507 //------------------------------MachPrologNode--------------------------------
 508 // Machine function Prolog Node
 509 class MachPrologNode : public MachIdealNode {
 510 public:
 511   MachPrologNode( ) {}








 512   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;
 513   virtual uint size(PhaseRegAlloc *ra_) const;
 514   virtual int reloc() const;
 515 
 516 #ifndef PRODUCT
 517   virtual const char *Name() const { return "Prolog"; }
 518   virtual void format( PhaseRegAlloc *, outputStream *st ) const;
 519 #endif
 520 };
 521 
 522 //------------------------------MachEpilogNode--------------------------------
 523 // Machine function Epilog Node
 524 class MachEpilogNode : public MachIdealNode {
 525 public:
 526   MachEpilogNode(bool do_poll = false) : _do_polling(do_poll) {}
 527   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;
 528   virtual uint size(PhaseRegAlloc *ra_) const;
 529   virtual int reloc() const;
 530   virtual const Pipeline *pipeline() const;
 531 
 532 private:
 533   bool _do_polling;
 534 
 535 public:
 536   bool do_polling() const { return _do_polling; }
 537 
 538 #ifndef PRODUCT
 539   virtual const char *Name() const { return "Epilog"; }
 540   virtual void format( PhaseRegAlloc *, outputStream *st ) const;
 541 #endif
 542 };
 543 
 544 //------------------------------MachNopNode-----------------------------------
 545 // Machine function Nop Node
 546 class MachNopNode : public MachIdealNode {
 547 private:
 548   int _count;

 900 
 901   void set_tf(const TypeFunc* tf)       { _tf = tf; }
 902   void set_entry_point(address p)       { _entry_point = p; }
 903   void set_cnt(float c)                 { _cnt = c; }
 904   void set_guaranteed_safepoint(bool b) { _guaranteed_safepoint = b; }
 905 
 906   MachCallNode() : MachSafePointNode() {
 907     init_class_id(Class_MachCall);
 908   }
 909 
 910   virtual const Type *bottom_type() const;
 911   virtual bool  pinned() const { return false; }
 912   virtual const Type* Value(PhaseGVN* phase) const;
 913   virtual const RegMask &in_RegMask(uint) const;
 914   virtual int ret_addr_offset() { return 0; }
 915 
 916   NOT_LP64(bool return_value_is_used() const;)
 917 
 918   // Similar to cousin class CallNode::returns_pointer
 919   bool returns_pointer() const;

 920 
 921   bool guaranteed_safepoint() const { return _guaranteed_safepoint; }
 922 
 923 #ifndef PRODUCT
 924   virtual void dump_spec(outputStream *st) const;
 925 #endif
 926 };
 927 
 928 //------------------------------MachCallJavaNode------------------------------
 929 // "Base" class for machine-specific versions of subroutine calls
 930 class MachCallJavaNode : public MachCallNode {
 931 protected:
 932   virtual bool cmp( const Node &n ) const;
 933   virtual uint size_of() const; // Size is bigger
 934 public:
 935   ciMethod* _method;                 // Method being direct called
 936   bool      _override_symbolic_info; // Override symbolic call site info from bytecode
 937   bool      _optimized_virtual;      // Tells if node is a static call or an optimized virtual
 938   bool      _method_handle_invoke;   // Tells if the call has to preserve SP
 939   bool      _arg_escape;             // ArgEscape in parameter list

  35 
  36 class BufferBlob;
  37 class CodeBuffer;
  38 class JVMState;
  39 class MachCallDynamicJavaNode;
  40 class MachCallJavaNode;
  41 class MachCallLeafNode;
  42 class MachCallNativeNode;
  43 class MachCallNode;
  44 class MachCallRuntimeNode;
  45 class MachCallStaticJavaNode;
  46 class MachEpilogNode;
  47 class MachIfNode;
  48 class MachNullCheckNode;
  49 class MachOper;
  50 class MachProjNode;
  51 class MachPrologNode;
  52 class MachReturnNode;
  53 class MachSafePointNode;
  54 class MachSpillCopyNode;
  55 class MachVEPNode;
  56 class Matcher;
  57 class PhaseRegAlloc;
  58 class RegMask;
  59 class RTMLockingCounters;
  60 class State;
  61 
  62 //---------------------------MachOper------------------------------------------
  63 class MachOper : public ResourceObj {
  64 public:
  65   // Allocate right next to the MachNodes in the same arena
  66   void *operator new(size_t x) throw() {
  67     Compile* C = Compile::current();
  68     return C->node_arena()->AmallocWords(x);
  69   }
  70 
  71   // Opcode
  72   virtual uint opcode() const = 0;
  73 
  74   // Number of input edges.
  75   // Generally at least 1

 474     dump();
 475 #endif
 476     ShouldNotCallThis();
 477   }
 478 
 479   virtual const RegMask &in_RegMask(uint idx) const {
 480     if (idx == mach_constant_base_node_input())
 481       return MachConstantBaseNode::static_out_RegMask();
 482     return MachNode::in_RegMask(idx);
 483   }
 484 
 485   // Input edge of MachConstantBaseNode.
 486   virtual uint mach_constant_base_node_input() const { return req() - 1; }
 487 
 488   int  constant_offset();
 489   int  constant_offset() const { return ((MachConstantNode*) this)->constant_offset(); }
 490   // Unchecked version to avoid assertions in debug output.
 491   int  constant_offset_unchecked() const;
 492 };
 493 
 494 //------------------------------MachVEPNode-----------------------------------
 495 // Machine Inline Type Entry Point Node
 496 class MachVEPNode : public MachIdealNode {
 497 public:
 498   Label* _verified_entry;
 499 
 500   MachVEPNode(Label* verified_entry, bool verified, bool receiver_only) :
 501     _verified_entry(verified_entry),
 502     _verified(verified),
 503     _receiver_only(receiver_only) {
 504     init_class_id(Class_MachVEP);
 505   }
 506   virtual bool cmp(const Node &n) const {
 507     return (_verified_entry == ((MachVEPNode&)n)._verified_entry) &&
 508            (_verified == ((MachVEPNode&)n)._verified) &&
 509            (_receiver_only == ((MachVEPNode&)n)._receiver_only) &&
 510            MachIdealNode::cmp(n);
 511   }
 512   virtual uint size_of() const { return sizeof(*this); }
 513   virtual void emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const;
 514 
 515 #ifndef PRODUCT
 516   virtual const char* Name() const { return "InlineType Entry-Point"; }
 517   virtual void format(PhaseRegAlloc*, outputStream* st) const;
 518 #endif
 519 private:
 520   bool   _verified;
 521   bool   _receiver_only;
 522 };
 523 
 524 //------------------------------MachUEPNode-----------------------------------
 525 // Machine Unvalidated Entry Point Node
 526 class MachUEPNode : public MachIdealNode {
 527 public:
 528   MachUEPNode( ) {}
 529   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;

 530 
 531 #ifndef PRODUCT
 532   virtual const char *Name() const { return "Unvalidated-Entry-Point"; }
 533   virtual void format( PhaseRegAlloc *, outputStream *st ) const;
 534 #endif
 535 };
 536 
 537 //------------------------------MachPrologNode--------------------------------
 538 // Machine function Prolog Node
 539 class MachPrologNode : public MachIdealNode {
 540 public:
 541   Label* _verified_entry;
 542 
 543   MachPrologNode(Label* verified_entry) : _verified_entry(verified_entry) {
 544     init_class_id(Class_MachProlog);
 545   }
 546   virtual bool cmp(const Node &n) const {
 547     return (_verified_entry == ((MachPrologNode&)n)._verified_entry) && MachIdealNode::cmp(n);
 548   }
 549   virtual uint size_of() const { return sizeof(*this); }
 550   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;

 551   virtual int reloc() const;
 552 
 553 #ifndef PRODUCT
 554   virtual const char *Name() const { return "Prolog"; }
 555   virtual void format( PhaseRegAlloc *, outputStream *st ) const;
 556 #endif
 557 };
 558 
 559 //------------------------------MachEpilogNode--------------------------------
 560 // Machine function Epilog Node
 561 class MachEpilogNode : public MachIdealNode {
 562 public:
 563   MachEpilogNode(bool do_poll = false) : _do_polling(do_poll) {}
 564   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;

 565   virtual int reloc() const;
 566   virtual const Pipeline *pipeline() const;
 567 
 568 private:
 569   bool _do_polling;
 570 
 571 public:
 572   bool do_polling() const { return _do_polling; }
 573 
 574 #ifndef PRODUCT
 575   virtual const char *Name() const { return "Epilog"; }
 576   virtual void format( PhaseRegAlloc *, outputStream *st ) const;
 577 #endif
 578 };
 579 
 580 //------------------------------MachNopNode-----------------------------------
 581 // Machine function Nop Node
 582 class MachNopNode : public MachIdealNode {
 583 private:
 584   int _count;

 936 
 937   void set_tf(const TypeFunc* tf)       { _tf = tf; }
 938   void set_entry_point(address p)       { _entry_point = p; }
 939   void set_cnt(float c)                 { _cnt = c; }
 940   void set_guaranteed_safepoint(bool b) { _guaranteed_safepoint = b; }
 941 
 942   MachCallNode() : MachSafePointNode() {
 943     init_class_id(Class_MachCall);
 944   }
 945 
 946   virtual const Type *bottom_type() const;
 947   virtual bool  pinned() const { return false; }
 948   virtual const Type* Value(PhaseGVN* phase) const;
 949   virtual const RegMask &in_RegMask(uint) const;
 950   virtual int ret_addr_offset() { return 0; }
 951 
 952   NOT_LP64(bool return_value_is_used() const;)
 953 
 954   // Similar to cousin class CallNode::returns_pointer
 955   bool returns_pointer() const;
 956   bool returns_scalarized() const;
 957 
 958   bool guaranteed_safepoint() const { return _guaranteed_safepoint; }
 959 
 960 #ifndef PRODUCT
 961   virtual void dump_spec(outputStream *st) const;
 962 #endif
 963 };
 964 
 965 //------------------------------MachCallJavaNode------------------------------
 966 // "Base" class for machine-specific versions of subroutine calls
 967 class MachCallJavaNode : public MachCallNode {
 968 protected:
 969   virtual bool cmp( const Node &n ) const;
 970   virtual uint size_of() const; // Size is bigger
 971 public:
 972   ciMethod* _method;                 // Method being direct called
 973   bool      _override_symbolic_info; // Override symbolic call site info from bytecode
 974   bool      _optimized_virtual;      // Tells if node is a static call or an optimized virtual
 975   bool      _method_handle_invoke;   // Tells if the call has to preserve SP
 976   bool      _arg_escape;             // ArgEscape in parameter list
< prev index next >