< prev index next >

src/share/vm/opto/callnode.hpp

Print this page




  63 //------------------------------StartNode--------------------------------------
  64 // The method start node
  65 class StartNode : public MultiNode {
  66   virtual uint cmp( const Node &n ) const;
  67   virtual uint size_of() const; // Size is bigger
  68 public:
  69   const TypeTuple *_domain;
  70   StartNode( Node *root, const TypeTuple *domain ) : MultiNode(2), _domain(domain) {
  71     init_class_id(Class_Start);
  72     init_req(0,this);
  73     init_req(1,root);
  74   }
  75   virtual int Opcode() const;
  76   virtual bool pinned() const { return true; };
  77   virtual const Type *bottom_type() const;
  78   virtual const TypePtr *adr_type() const { return TypePtr::BOTTOM; }
  79   virtual const Type* Value(PhaseGVN* phase) const;
  80   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
  81   virtual void  calling_convention( BasicType* sig_bt, VMRegPair *parm_reg, uint length ) const;
  82   virtual const RegMask &in_RegMask(uint) const;
  83   virtual Node *match( const ProjNode *proj, const Matcher *m );
  84   virtual uint ideal_reg() const { return 0; }
  85 #ifndef PRODUCT
  86   virtual void  dump_spec(outputStream *st) const;
  87   virtual void  dump_compact_spec(outputStream *st) const;
  88 #endif
  89 };
  90 
  91 //------------------------------StartOSRNode-----------------------------------
  92 // The method start node for on stack replacement code
  93 class StartOSRNode : public StartNode {
  94 public:
  95   StartOSRNode( Node *root, const TypeTuple *domain ) : StartNode(root, domain) {}
  96   virtual int   Opcode() const;
  97   static  const TypeTuple *osr_domain();
  98 };
  99 
 100 
 101 //------------------------------ParmNode---------------------------------------
 102 // Incoming parameters
 103 class ParmNode : public ProjNode {


 582     init_class_id(Class_Call);
 583   }
 584 
 585   const TypeFunc* tf()         const { return _tf; }
 586   const address  entry_point() const { return _entry_point; }
 587   const float    cnt()         const { return _cnt; }
 588   CallGenerator* generator()   const { return _generator; }
 589 
 590   void set_tf(const TypeFunc* tf)       { _tf = tf; }
 591   void set_entry_point(address p)       { _entry_point = p; }
 592   void set_cnt(float c)                 { _cnt = c; }
 593   void set_generator(CallGenerator* cg) { _generator = cg; }
 594 
 595   virtual const Type *bottom_type() const;
 596   virtual const Type* Value(PhaseGVN* phase) const;
 597   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 598   virtual Node* Identity(PhaseGVN* phase) { return this; }
 599   virtual uint        cmp( const Node &n ) const;
 600   virtual uint        size_of() const = 0;
 601   virtual void        calling_convention( BasicType* sig_bt, VMRegPair *parm_regs, uint argcnt ) const;
 602   virtual Node       *match( const ProjNode *proj, const Matcher *m );
 603   virtual uint        ideal_reg() const { return NotAMachineReg; }
 604   // Are we guaranteed that this node is a safepoint?  Not true for leaf calls and
 605   // for some macro nodes whose expansion does not have a safepoint on the fast path.
 606   virtual bool        guaranteed_safepoint()  { return true; }
 607   // For macro nodes, the JVMState gets modified during expansion. If calls
 608   // use MachConstantBase, it gets modified during matching. So when cloning
 609   // the node the JVMState must be cloned. Default is not to clone.
 610   virtual void clone_jvms(Compile* C) {
 611     if (C->needs_clone_jvms() && jvms() != NULL) {
 612       set_jvms(jvms()->clone_deep(C));
 613       jvms()->set_map_deep(this);
 614     }
 615   }
 616 
 617   // Returns true if the call may modify n
 618   virtual bool        may_modify(const TypeOopPtr *t_oop, PhaseTransform *phase);
 619   // Does this node have a use of n other than in debug information?
 620   bool                has_non_debug_use(Node *n);
 621   bool                has_debug_use(Node *n);
 622   // Returns the unique CheckCastPP of a call
 623   // or result projection is there are several CheckCastPP
 624   // or returns NULL if there is no one.
 625   Node *result_cast();
 626   // Does this node returns pointer?
 627   bool returns_pointer() const {
 628     const TypeTuple *r = tf()->range();
 629     return (r->cnt() > TypeFunc::Parms &&
 630             r->field_at(TypeFunc::Parms)->isa_ptr());
 631   }
 632 
 633   // Collect all the interesting edges from a call for use in
 634   // replacing the call by something else.  Used by macro expansion
 635   // and the late inlining support.
 636   void extract_projections(CallProjections* projs, bool separate_io_proj, bool do_asserts = true);
 637 
 638   virtual uint match_edge(uint idx) const;
 639 
 640   bool is_call_to_arraycopystub() const;
 641 
 642 #ifndef PRODUCT
 643   virtual void        dump_req(outputStream *st = tty) const;
 644   virtual void        dump_spec(outputStream *st) const;
 645 #endif
 646 };
 647 
 648 




  63 //------------------------------StartNode--------------------------------------
  64 // The method start node
  65 class StartNode : public MultiNode {
  66   virtual uint cmp( const Node &n ) const;
  67   virtual uint size_of() const; // Size is bigger
  68 public:
  69   const TypeTuple *_domain;
  70   StartNode( Node *root, const TypeTuple *domain ) : MultiNode(2), _domain(domain) {
  71     init_class_id(Class_Start);
  72     init_req(0,this);
  73     init_req(1,root);
  74   }
  75   virtual int Opcode() const;
  76   virtual bool pinned() const { return true; };
  77   virtual const Type *bottom_type() const;
  78   virtual const TypePtr *adr_type() const { return TypePtr::BOTTOM; }
  79   virtual const Type* Value(PhaseGVN* phase) const;
  80   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
  81   virtual void  calling_convention( BasicType* sig_bt, VMRegPair *parm_reg, uint length ) const;
  82   virtual const RegMask &in_RegMask(uint) const;
  83   virtual Node *match(const ProjNode *proj, const Matcher *m, const RegMask* mask);
  84   virtual uint ideal_reg() const { return 0; }
  85 #ifndef PRODUCT
  86   virtual void  dump_spec(outputStream *st) const;
  87   virtual void  dump_compact_spec(outputStream *st) const;
  88 #endif
  89 };
  90 
  91 //------------------------------StartOSRNode-----------------------------------
  92 // The method start node for on stack replacement code
  93 class StartOSRNode : public StartNode {
  94 public:
  95   StartOSRNode( Node *root, const TypeTuple *domain ) : StartNode(root, domain) {}
  96   virtual int   Opcode() const;
  97   static  const TypeTuple *osr_domain();
  98 };
  99 
 100 
 101 //------------------------------ParmNode---------------------------------------
 102 // Incoming parameters
 103 class ParmNode : public ProjNode {


 582     init_class_id(Class_Call);
 583   }
 584 
 585   const TypeFunc* tf()         const { return _tf; }
 586   const address  entry_point() const { return _entry_point; }
 587   const float    cnt()         const { return _cnt; }
 588   CallGenerator* generator()   const { return _generator; }
 589 
 590   void set_tf(const TypeFunc* tf)       { _tf = tf; }
 591   void set_entry_point(address p)       { _entry_point = p; }
 592   void set_cnt(float c)                 { _cnt = c; }
 593   void set_generator(CallGenerator* cg) { _generator = cg; }
 594 
 595   virtual const Type *bottom_type() const;
 596   virtual const Type* Value(PhaseGVN* phase) const;
 597   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 598   virtual Node* Identity(PhaseGVN* phase) { return this; }
 599   virtual uint        cmp( const Node &n ) const;
 600   virtual uint        size_of() const = 0;
 601   virtual void        calling_convention( BasicType* sig_bt, VMRegPair *parm_regs, uint argcnt ) const;
 602   virtual Node       *match(const ProjNode *proj, const Matcher *m, const RegMask* mask);
 603   virtual uint        ideal_reg() const { return NotAMachineReg; }
 604   // Are we guaranteed that this node is a safepoint?  Not true for leaf calls and
 605   // for some macro nodes whose expansion does not have a safepoint on the fast path.
 606   virtual bool        guaranteed_safepoint()  { return true; }
 607   // For macro nodes, the JVMState gets modified during expansion. If calls
 608   // use MachConstantBase, it gets modified during matching. So when cloning
 609   // the node the JVMState must be cloned. Default is not to clone.
 610   virtual void clone_jvms(Compile* C) {
 611     if (C->needs_clone_jvms() && jvms() != NULL) {
 612       set_jvms(jvms()->clone_deep(C));
 613       jvms()->set_map_deep(this);
 614     }
 615   }
 616 
 617   // Returns true if the call may modify n
 618   virtual bool        may_modify(const TypeOopPtr *t_oop, PhaseTransform *phase);
 619   // Does this node have a use of n other than in debug information?
 620   bool                has_non_debug_use(Node *n);
 621   bool                has_debug_use(Node *n);
 622   // Returns the unique CheckCastPP of a call
 623   // or result projection is there are several CheckCastPP
 624   // or returns NULL if there is no one.
 625   Node *result_cast();
 626   // Does this node returns pointer?
 627   bool returns_pointer() const {
 628     const TypeTuple *r = tf()->range_sig();
 629     return (r->cnt() > TypeFunc::Parms &&
 630             r->field_at(TypeFunc::Parms)->isa_ptr());
 631   }
 632 
 633   // Collect all the interesting edges from a call for use in
 634   // replacing the call by something else.  Used by macro expansion
 635   // and the late inlining support.
 636   void extract_projections(CallProjections* projs, bool separate_io_proj, bool do_asserts = true);
 637 
 638   virtual uint match_edge(uint idx) const;
 639 
 640   bool is_call_to_arraycopystub() const;
 641 
 642 #ifndef PRODUCT
 643   virtual void        dump_req(outputStream *st = tty) const;
 644   virtual void        dump_spec(outputStream *st) const;
 645 #endif
 646 };
 647 
 648 


< prev index next >