386 // for JVM states during parsing, intrinsic expansion, etc. |
386 // for JVM states during parsing, intrinsic expansion, etc. |
387 SafePointNode* next_exception() const; |
387 SafePointNode* next_exception() const; |
388 void set_next_exception(SafePointNode* n); |
388 void set_next_exception(SafePointNode* n); |
389 bool has_exceptions() const { return next_exception() != NULL; } |
389 bool has_exceptions() const { return next_exception() != NULL; } |
390 |
390 |
|
391 // Does this node have a use of n other than in debug information? |
|
392 virtual bool has_non_debug_use(Node *n) {return false; } |
|
393 |
391 // Standard Node stuff |
394 // Standard Node stuff |
392 virtual int Opcode() const; |
395 virtual int Opcode() const; |
393 virtual bool pinned() const { return true; } |
396 virtual bool pinned() const { return true; } |
394 virtual const Type *Value( PhaseTransform *phase ) const; |
397 virtual const Type *Value( PhaseTransform *phase ) const; |
395 virtual const Type *bottom_type() const { return Type::CONTROL; } |
398 virtual const Type *bottom_type() const { return Type::CONTROL; } |
455 class CallNode : public SafePointNode { |
458 class CallNode : public SafePointNode { |
456 public: |
459 public: |
457 const TypeFunc *_tf; // Function type |
460 const TypeFunc *_tf; // Function type |
458 address _entry_point; // Address of method being called |
461 address _entry_point; // Address of method being called |
459 float _cnt; // Estimate of number of times called |
462 float _cnt; // Estimate of number of times called |
460 PointsToNode::EscapeState _escape_state; |
|
461 |
463 |
462 CallNode(const TypeFunc* tf, address addr, const TypePtr* adr_type) |
464 CallNode(const TypeFunc* tf, address addr, const TypePtr* adr_type) |
463 : SafePointNode(tf->domain()->cnt(), NULL, adr_type), |
465 : SafePointNode(tf->domain()->cnt(), NULL, adr_type), |
464 _tf(tf), |
466 _tf(tf), |
465 _entry_point(addr), |
467 _entry_point(addr), |
466 _cnt(COUNT_UNKNOWN) |
468 _cnt(COUNT_UNKNOWN) |
467 { |
469 { |
468 init_class_id(Class_Call); |
470 init_class_id(Class_Call); |
469 init_flags(Flag_is_Call); |
471 init_flags(Flag_is_Call); |
470 _escape_state = PointsToNode::UnknownEscape; |
|
471 } |
472 } |
472 |
473 |
473 const TypeFunc* tf() const { return _tf; } |
474 const TypeFunc* tf() const { return _tf; } |
474 const address entry_point() const { return _entry_point; } |
475 const address entry_point() const { return _entry_point; } |
475 const float cnt() const { return _cnt; } |
476 const float cnt() const { return _cnt; } |
491 virtual bool guaranteed_safepoint() { return true; } |
492 virtual bool guaranteed_safepoint() { return true; } |
492 // For macro nodes, the JVMState gets modified during expansion, so when cloning |
493 // For macro nodes, the JVMState gets modified during expansion, so when cloning |
493 // the node the JVMState must be cloned. |
494 // the node the JVMState must be cloned. |
494 virtual void clone_jvms() { } // default is not to clone |
495 virtual void clone_jvms() { } // default is not to clone |
495 |
496 |
|
497 // Returns true if the call may modify n |
|
498 virtual bool may_modify(const TypePtr *addr_t, PhaseTransform *phase); |
|
499 // Does this node have a use of n other than in debug information? |
|
500 virtual bool has_non_debug_use(Node *n); |
|
501 // Returns the unique CheckCastPP of a call |
|
502 // or result projection is there are several CheckCastPP |
|
503 // or returns NULL if there is no one. |
|
504 Node *result_cast(); |
|
505 |
496 virtual uint match_edge(uint idx) const; |
506 virtual uint match_edge(uint idx) const; |
497 |
507 |
498 #ifndef PRODUCT |
508 #ifndef PRODUCT |
499 virtual void dump_req() const; |
509 virtual void dump_req() const; |
500 virtual void dump_spec(outputStream *st) const; |
510 virtual void dump_spec(outputStream *st) const; |
687 } |
697 } |
688 virtual int Opcode() const; |
698 virtual int Opcode() const; |
689 virtual uint ideal_reg() const { return Op_RegP; } |
699 virtual uint ideal_reg() const { return Op_RegP; } |
690 virtual bool guaranteed_safepoint() { return false; } |
700 virtual bool guaranteed_safepoint() { return false; } |
691 |
701 |
|
702 // allocations do not modify their arguments |
|
703 virtual bool may_modify(const TypePtr *addr_t, PhaseTransform *phase) { return false;} |
|
704 |
692 // Pattern-match a possible usage of AllocateNode. |
705 // Pattern-match a possible usage of AllocateNode. |
693 // Return null if no allocation is recognized. |
706 // Return null if no allocation is recognized. |
694 // The operand is the pointer produced by the (possible) allocation. |
707 // The operand is the pointer produced by the (possible) allocation. |
695 // It must be a projection of the Allocate or its subsequent CastPP. |
708 // It must be a projection of the Allocate or its subsequent CastPP. |
696 // (Note: This function is defined in file graphKit.cpp, near |
709 // (Note: This function is defined in file graphKit.cpp, near |
798 virtual uint size_of() const { return sizeof(*this); } |
811 virtual uint size_of() const { return sizeof(*this); } |
799 |
812 |
800 bool is_eliminated() {return _eliminate; } |
813 bool is_eliminated() {return _eliminate; } |
801 // mark node as eliminated and update the counter if there is one |
814 // mark node as eliminated and update the counter if there is one |
802 void set_eliminated(); |
815 void set_eliminated(); |
|
816 |
|
817 // locking does not modify its arguments |
|
818 virtual bool may_modify(const TypePtr *addr_t, PhaseTransform *phase){ return false;} |
803 |
819 |
804 #ifndef PRODUCT |
820 #ifndef PRODUCT |
805 void create_lock_counter(JVMState* s); |
821 void create_lock_counter(JVMState* s); |
806 NamedCounter* counter() const { return _counter; } |
822 NamedCounter* counter() const { return _counter; } |
807 #endif |
823 #endif |