src/share/vm/opto/coalesce.hpp

Print this page




  90 
  91 //------------------------------PhaseConservativeCoalesce----------------------
  92 // Conservatively, pessimistic coalesce copies.  Conservative means do not
  93 // coalesce if the resultant live range will be uncolorable.  Pessimistic
  94 // means we cannot coalesce if 2 live ranges interfere.  This implies we do
  95 // not hit a fixed point right away.
  96 class PhaseConservativeCoalesce : public PhaseCoalesce {
  97   IndexSet _ulr;               // Union live range interferences
  98 public:
  99   // Coalesce copies
 100   PhaseConservativeCoalesce( PhaseChaitin &chaitin );
 101 
 102   virtual void verify();
 103 
 104   // Conservatively coalesce copies in this block
 105   virtual void coalesce( Block *b );
 106 
 107   // Coalesce this chain of copies away
 108   bool copy_copy( Node *dst_copy, Node *src_copy, Block *b, uint bindex );
 109 



 110   void union_helper( Node *lr1_node, Node *lr2_node, uint lr1, uint lr2, Node *src_def, Node *dst_copy, Node *src_copy, Block *b, uint bindex );
 111 
 112   uint compute_separating_interferences(Node *dst_copy, Node *src_copy, Block *b, uint bindex, RegMask &rm, uint rm_size, uint reg_degree, uint lr1, uint lr2);
 113 
 114   void update_ifg(uint lr1, uint lr2, IndexSet *n_lr1, IndexSet *n_lr2);
 115 };
 116 
 117 #endif // SHARE_VM_OPTO_COALESCE_HPP


  90 
  91 //------------------------------PhaseConservativeCoalesce----------------------
  92 // Conservatively, pessimistic coalesce copies.  Conservative means do not
  93 // coalesce if the resultant live range will be uncolorable.  Pessimistic
  94 // means we cannot coalesce if 2 live ranges interfere.  This implies we do
  95 // not hit a fixed point right away.
  96 class PhaseConservativeCoalesce : public PhaseCoalesce {
  97   IndexSet _ulr;               // Union live range interferences
  98 public:
  99   // Coalesce copies
 100   PhaseConservativeCoalesce( PhaseChaitin &chaitin );
 101 
 102   virtual void verify();
 103 
 104   // Conservatively coalesce copies in this block
 105   virtual void coalesce( Block *b );
 106 
 107   // Coalesce this chain of copies away
 108   bool copy_copy( Node *dst_copy, Node *src_copy, Block *b, uint bindex );
 109 
 110   // Compute the union of all elements of one and two which interfere with the RegMask mask.
 111   uint lrg_union(IndexSet& dst, uint lr1, uint lr2, const uint fail_degree, const PhaseIFG *ifg, const RegMask &mask);
 112 
 113   void union_helper( Node *lr1_node, Node *lr2_node, uint lr1, uint lr2, Node *src_def, Node *dst_copy, Node *src_copy, Block *b, uint bindex );
 114 
 115   uint compute_separating_interferences(Node *dst_copy, Node *src_copy, Block *b, uint bindex, RegMask &rm, uint rm_size, uint reg_degree, uint lr1, uint lr2);
 116 
 117   void update_ifg(uint lr1, uint lr2, IndexSet *n_lr1, IndexSet *n_lr2);
 118 };
 119 
 120 #endif // SHARE_VM_OPTO_COALESCE_HPP