src/share/vm/opto/opaquenode.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/opaquenode.hpp

Print this page
rev 7387 : 8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
Reviewed-by: ?


  70     // Put it on the Macro nodes list to removed during macro nodes expansion.
  71     init_flags(Flag_is_macro);
  72     C->add_macro_node(this);
  73   }
  74   virtual int Opcode() const;
  75   virtual const Type *bottom_type() const { return TypeInt::INT; }
  76 };
  77 
  78 //------------------------------Opaque3Node------------------------------------
  79 // A node to prevent unwanted optimizations. Will be optimized only during
  80 // macro nodes expansion.
  81 class Opaque3Node : public Opaque2Node {
  82   int _opt; // what optimization it was used for
  83   public:
  84   enum { RTM_OPT };
  85   Opaque3Node(Compile* C, Node *n, int opt) : Opaque2Node(C, n), _opt(opt) {}
  86   virtual int Opcode() const;
  87   bool rtm_opt() const { return (_opt == RTM_OPT); }
  88 };
  89 























  90 #endif // SHARE_VM_OPTO_OPAQUENODE_HPP
  91 


  70     // Put it on the Macro nodes list to removed during macro nodes expansion.
  71     init_flags(Flag_is_macro);
  72     C->add_macro_node(this);
  73   }
  74   virtual int Opcode() const;
  75   virtual const Type *bottom_type() const { return TypeInt::INT; }
  76 };
  77 
  78 //------------------------------Opaque3Node------------------------------------
  79 // A node to prevent unwanted optimizations. Will be optimized only during
  80 // macro nodes expansion.
  81 class Opaque3Node : public Opaque2Node {
  82   int _opt; // what optimization it was used for
  83   public:
  84   enum { RTM_OPT };
  85   Opaque3Node(Compile* C, Node *n, int opt) : Opaque2Node(C, n), _opt(opt) {}
  86   virtual int Opcode() const;
  87   bool rtm_opt() const { return (_opt == RTM_OPT); }
  88 };
  89 
  90 //------------------------------Opaque4Node------------------------------------
  91 // The node can store branch frequencies during parsing.
  92 // Once parsing is over, the node goes away (during IGVN).
  93 class Opaque4Node : public Node {
  94   uint _taken;
  95   uint _not_taken;
  96   bool _consumed;
  97   bool _delay_removal;
  98   virtual uint hash() const ;                  // { return NO_HASH; }
  99   virtual uint cmp( const Node &n ) const;
 100   public:
 101   Opaque4Node(Node *n, uint taken, uint not_taken) : Node(0, n),
 102           _taken(taken), _not_taken(not_taken), _delay_removal(true), _consumed(false) {}
 103   virtual int Opcode() const;
 104   uint     taken() const { return     _taken; }
 105   uint not_taken() const { return _not_taken; }
 106   void   consume()       { _consumed = true;  }
 107 
 108   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 109   virtual Node *Identity(PhaseTransform *phase);
 110   virtual const Type *bottom_type() const { return TypeInt::INT; }
 111 };
 112 
 113 #endif // SHARE_VM_OPTO_OPAQUENODE_HPP
 114 
src/share/vm/opto/opaquenode.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File