src/share/vm/opto/machnode.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 7063628 Sdiff src/share/vm/opto

src/share/vm/opto/machnode.hpp

Print this page




 514 #endif
 515 };
 516 
 517 //------------------------------MachNullChkNode--------------------------------
 518 // Machine-dependent null-pointer-check Node.  Points a real MachNode that is
 519 // also some kind of memory op.  Turns the indicated MachNode into a
 520 // conditional branch with good latency on the ptr-not-null path and awful
 521 // latency on the pointer-is-null path.
 522 
 523 class MachNullCheckNode : public MachIdealNode {
 524 public:
 525   const uint _vidx;             // Index of memop being tested
 526   MachNullCheckNode( Node *ctrl, Node *memop, uint vidx ) : MachIdealNode(), _vidx(vidx) {
 527     init_class_id(Class_MachNullCheck);
 528     init_flags(Flag_is_Branch | Flag_is_pc_relative);
 529     add_req(ctrl);
 530     add_req(memop);
 531   }
 532 
 533   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;

 534   virtual bool pinned() const { return true; };
 535   virtual void negate() { }
 536   virtual const class Type *bottom_type() const { return TypeTuple::IFBOTH; }
 537   virtual uint ideal_reg() const { return NotAMachineReg; }
 538   virtual const RegMask &in_RegMask(uint) const;
 539   virtual const RegMask &out_RegMask() const { return RegMask::Empty; }
 540 #ifndef PRODUCT
 541   virtual const char *Name() const { return "NullCheck"; }
 542   virtual void format( PhaseRegAlloc *, outputStream *st ) const;
 543 #endif
 544 };
 545 
 546 //------------------------------MachProjNode----------------------------------
 547 // Machine-dependent Ideal projections (how is that for an oxymoron).  Really
 548 // just MachNodes made by the Ideal world that replicate simple projections
 549 // but with machine-dependent input & output register masks.  Generally
 550 // produced as part of calling conventions.  Normally I make MachNodes as part
 551 // of the Matcher process, but the Matcher is ill suited to issues involving
 552 // frame handling, so frame handling is all done in the Ideal world with
 553 // occasional callbacks to the machine model for important info.


 836 
 837 //------------------------------labelOper--------------------------------------
 838 // Machine-independent version of label operand
 839 class labelOper : public MachOper {
 840 private:
 841   virtual uint           num_edges() const { return 0; }
 842 public:
 843   // Supported for fixed size branches
 844   Label* _label;                // Label for branch(es)
 845 
 846   uint _block_num;
 847 
 848   labelOper() : _block_num(0), _label(0) {}
 849 
 850   labelOper(Label* label, uint block_num) : _label(label), _block_num(block_num) {}
 851 
 852   labelOper(labelOper* l) : _label(l->_label) , _block_num(l->_block_num) {}
 853 
 854   virtual MachOper *clone(Compile* C) const;
 855 
 856   virtual Label *label() const { return _label; }
 857 
 858   virtual uint           opcode() const;
 859 
 860   virtual uint           hash()   const;
 861   virtual uint           cmp( const MachOper &oper ) const;
 862 #ifndef PRODUCT
 863   virtual const char    *Name()   const { return "Label";}
 864 
 865   virtual void int_format(PhaseRegAlloc *ra, const MachNode *node, outputStream *st) const;
 866   virtual void ext_format(PhaseRegAlloc *ra, const MachNode *node, int idx, outputStream *st) const { int_format( ra, node, st ); }
 867 #endif
 868 };
 869 
 870 
 871 //------------------------------methodOper--------------------------------------
 872 // Machine-independent version of method operand
 873 class methodOper : public MachOper {
 874 private:
 875   virtual uint           num_edges() const { return 0; }
 876 public:




 514 #endif
 515 };
 516 
 517 //------------------------------MachNullChkNode--------------------------------
 518 // Machine-dependent null-pointer-check Node.  Points a real MachNode that is
 519 // also some kind of memory op.  Turns the indicated MachNode into a
 520 // conditional branch with good latency on the ptr-not-null path and awful
 521 // latency on the pointer-is-null path.
 522 
 523 class MachNullCheckNode : public MachIdealNode {
 524 public:
 525   const uint _vidx;             // Index of memop being tested
 526   MachNullCheckNode( Node *ctrl, Node *memop, uint vidx ) : MachIdealNode(), _vidx(vidx) {
 527     init_class_id(Class_MachNullCheck);
 528     init_flags(Flag_is_Branch | Flag_is_pc_relative);
 529     add_req(ctrl);
 530     add_req(memop);
 531   }
 532 
 533   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;
 534   virtual void label_set(Label& label, uint block_num);
 535   virtual bool pinned() const { return true; };
 536   virtual void negate() { }
 537   virtual const class Type *bottom_type() const { return TypeTuple::IFBOTH; }
 538   virtual uint ideal_reg() const { return NotAMachineReg; }
 539   virtual const RegMask &in_RegMask(uint) const;
 540   virtual const RegMask &out_RegMask() const { return RegMask::Empty; }
 541 #ifndef PRODUCT
 542   virtual const char *Name() const { return "NullCheck"; }
 543   virtual void format( PhaseRegAlloc *, outputStream *st ) const;
 544 #endif
 545 };
 546 
 547 //------------------------------MachProjNode----------------------------------
 548 // Machine-dependent Ideal projections (how is that for an oxymoron).  Really
 549 // just MachNodes made by the Ideal world that replicate simple projections
 550 // but with machine-dependent input & output register masks.  Generally
 551 // produced as part of calling conventions.  Normally I make MachNodes as part
 552 // of the Matcher process, but the Matcher is ill suited to issues involving
 553 // frame handling, so frame handling is all done in the Ideal world with
 554 // occasional callbacks to the machine model for important info.


 837 
 838 //------------------------------labelOper--------------------------------------
 839 // Machine-independent version of label operand
 840 class labelOper : public MachOper {
 841 private:
 842   virtual uint           num_edges() const { return 0; }
 843 public:
 844   // Supported for fixed size branches
 845   Label* _label;                // Label for branch(es)
 846 
 847   uint _block_num;
 848 
 849   labelOper() : _block_num(0), _label(0) {}
 850 
 851   labelOper(Label* label, uint block_num) : _label(label), _block_num(block_num) {}
 852 
 853   labelOper(labelOper* l) : _label(l->_label) , _block_num(l->_block_num) {}
 854 
 855   virtual MachOper *clone(Compile* C) const;
 856 
 857   virtual Label *label() const { assert(_label != NULL, "need Label"); return _label; }
 858 
 859   virtual uint           opcode() const;
 860 
 861   virtual uint           hash()   const;
 862   virtual uint           cmp( const MachOper &oper ) const;
 863 #ifndef PRODUCT
 864   virtual const char    *Name()   const { return "Label";}
 865 
 866   virtual void int_format(PhaseRegAlloc *ra, const MachNode *node, outputStream *st) const;
 867   virtual void ext_format(PhaseRegAlloc *ra, const MachNode *node, int idx, outputStream *st) const { int_format( ra, node, st ); }
 868 #endif
 869 };
 870 
 871 
 872 //------------------------------methodOper--------------------------------------
 873 // Machine-independent version of method operand
 874 class methodOper : public MachOper {
 875 private:
 876   virtual uint           num_edges() const { return 0; }
 877 public:


src/share/vm/opto/machnode.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File