< prev index next >

src/hotspot/share/opto/opaquenode.hpp

Print this page




  92 // to prove. If during optimizations, that check becomes true or
  93 // false, the Opaque4 node is replaced by that constant true or
  94 // false. Input 2 is the constant value we know the test takes. After
  95 // loop optimizations, we replace input 1 by input 2 so the control
  96 // that depends on that test can be removed and there's no overhead at
  97 // runtime.
  98 class Opaque4Node : public Node {
  99   public:
 100   Opaque4Node(Compile* C, Node *tst, Node* final_tst) : Node(0, tst, final_tst) {
 101     // Put it on the Macro nodes list to removed during macro nodes expansion.
 102     init_flags(Flag_is_macro);
 103     C->add_macro_node(this);
 104   }
 105   virtual int Opcode() const;
 106   virtual const Type *bottom_type() const { return TypeInt::BOOL; }
 107   virtual const Type* Value(PhaseGVN* phase) const;
 108   virtual Node* Identity(PhaseGVN* phase);
 109 };
 110 
 111 












 112 //------------------------------ProfileBooleanNode-------------------------------
 113 // A node represents value profile for a boolean during parsing.
 114 // Once parsing is over, the node goes away (during IGVN).
 115 // It is used to override branch frequencies from MDO (see has_injected_profile in parse2.cpp).
 116 class ProfileBooleanNode : public Node {
 117   uint _false_cnt;
 118   uint _true_cnt;
 119   bool _consumed;
 120   bool _delay_removal;
 121   virtual uint hash() const ;                  // { return NO_HASH; }
 122   virtual uint cmp( const Node &n ) const;
 123   public:
 124   ProfileBooleanNode(Node *n, uint false_cnt, uint true_cnt) : Node(0, n),
 125           _false_cnt(false_cnt), _true_cnt(true_cnt), _delay_removal(true), _consumed(false) {}
 126 
 127   uint false_count() const { return _false_cnt; }
 128   uint  true_count() const { return  _true_cnt; }
 129 
 130   void consume() { _consumed = true;  }
 131 


  92 // to prove. If during optimizations, that check becomes true or
  93 // false, the Opaque4 node is replaced by that constant true or
  94 // false. Input 2 is the constant value we know the test takes. After
  95 // loop optimizations, we replace input 1 by input 2 so the control
  96 // that depends on that test can be removed and there's no overhead at
  97 // runtime.
  98 class Opaque4Node : public Node {
  99   public:
 100   Opaque4Node(Compile* C, Node *tst, Node* final_tst) : Node(0, tst, final_tst) {
 101     // Put it on the Macro nodes list to removed during macro nodes expansion.
 102     init_flags(Flag_is_macro);
 103     C->add_macro_node(this);
 104   }
 105   virtual int Opcode() const;
 106   virtual const Type *bottom_type() const { return TypeInt::BOOL; }
 107   virtual const Type* Value(PhaseGVN* phase) const;
 108   virtual Node* Identity(PhaseGVN* phase);
 109 };
 110 
 111 
 112 // For loop strip mining
 113 class Opaque5Node : public Opaque2Node {
 114   private:
 115   CountedLoopNode* inner_loop() const;
 116 
 117   public:
 118   Opaque5Node(Compile* C, Node *n) : Opaque2Node(C, n) {}
 119   virtual int Opcode() const;
 120 
 121   Node* adjust_strip_mined_loop(PhaseGVN* phase);
 122 };
 123 
 124 //------------------------------ProfileBooleanNode-------------------------------
 125 // A node represents value profile for a boolean during parsing.
 126 // Once parsing is over, the node goes away (during IGVN).
 127 // It is used to override branch frequencies from MDO (see has_injected_profile in parse2.cpp).
 128 class ProfileBooleanNode : public Node {
 129   uint _false_cnt;
 130   uint _true_cnt;
 131   bool _consumed;
 132   bool _delay_removal;
 133   virtual uint hash() const ;                  // { return NO_HASH; }
 134   virtual uint cmp( const Node &n ) const;
 135   public:
 136   ProfileBooleanNode(Node *n, uint false_cnt, uint true_cnt) : Node(0, n),
 137           _false_cnt(false_cnt), _true_cnt(true_cnt), _delay_removal(true), _consumed(false) {}
 138 
 139   uint false_count() const { return _false_cnt; }
 140   uint  true_count() const { return  _true_cnt; }
 141 
 142   void consume() { _consumed = true;  }
 143 
< prev index next >