hotspot/src/share/vm/opto/opaquenode.hpp
changeset 28912 27fac2f8fdbe
parent 23528 8f1a7f5e8066
child 35551 36ef3841fb34
equal deleted inserted replaced
28730:106944a21769 28912:27fac2f8fdbe
    85   Opaque3Node(Compile* C, Node *n, int opt) : Opaque2Node(C, n), _opt(opt) {}
    85   Opaque3Node(Compile* C, Node *n, int opt) : Opaque2Node(C, n), _opt(opt) {}
    86   virtual int Opcode() const;
    86   virtual int Opcode() const;
    87   bool rtm_opt() const { return (_opt == RTM_OPT); }
    87   bool rtm_opt() const { return (_opt == RTM_OPT); }
    88 };
    88 };
    89 
    89 
       
    90 //------------------------------ProfileBooleanNode-------------------------------
       
    91 // A node represents value profile for a boolean during parsing.
       
    92 // Once parsing is over, the node goes away (during IGVN).
       
    93 // It is used to override branch frequencies from MDO (see has_injected_profile in parse2.cpp).
       
    94 class ProfileBooleanNode : public Node {
       
    95   uint _false_cnt;
       
    96   uint _true_cnt;
       
    97   bool _consumed;
       
    98   bool _delay_removal;
       
    99   virtual uint hash() const ;                  // { return NO_HASH; }
       
   100   virtual uint cmp( const Node &n ) const;
       
   101   public:
       
   102   ProfileBooleanNode(Node *n, uint false_cnt, uint true_cnt) : Node(0, n),
       
   103           _false_cnt(false_cnt), _true_cnt(true_cnt), _delay_removal(true), _consumed(false) {}
       
   104 
       
   105   uint false_count() const { return _false_cnt; }
       
   106   uint  true_count() const { return  _true_cnt; }
       
   107 
       
   108   void consume() { _consumed = true;  }
       
   109 
       
   110   virtual int Opcode() const;
       
   111   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
       
   112   virtual Node *Identity(PhaseTransform *phase);
       
   113   virtual const Type *bottom_type() const { return TypeInt::BOOL; }
       
   114 };
       
   115 
    90 #endif // SHARE_VM_OPTO_OPAQUENODE_HPP
   116 #endif // SHARE_VM_OPTO_OPAQUENODE_HPP
    91 
   117