< prev index next >

src/hotspot/share/opto/chaitin.hpp

Print this page

275   void Union( uint a, uint b );
276   // Test for edge in Squared-up matrix
277   int test_edge_sq( uint a, uint b ) const;
278   // Yank a Node and all connected edges from the IFG.  Be prepared to
279   // re-insert the yanked Node in reverse order of yanking.  Return a
280   // list of neighbors (edges) yanked.
281   IndexSet *remove_node( uint a );
282   // Reinsert a yanked Node
283   void re_insert( uint a );
284   // Return set of neighbors
285   IndexSet *neighbors( uint a ) const { return &_adjs[a]; }
286 
287 #ifndef PRODUCT
288   // Dump the IFG
289   void dump() const;
290   void stats() const;
291   void verify( const PhaseChaitin * ) const;
292 #endif
293 
294   //--------------- Live Range Accessors
295   LRG &lrgs(uint idx) const { assert(idx < _maxlrg, "oob"); return _lrgs[idx]; }
296 
297   // Compute and set effective degree.  Might be folded into SquareUp().
298   void Compute_Effective_Degree();
299 
300   // Compute effective degree as the sum of neighbors' _sizes.
301   int effective_degree( uint lidx ) const;
302 };
303 
304 // The LiveRangeMap class is responsible for storing node to live range id mapping.
305 // Each node is mapped to a live range id (a virtual register). Nodes that are
306 // not considered for register allocation are given live range id 0.
307 class LiveRangeMap {
308 
309 private:
310 
311   uint _max_lrg_id;
312 
313   // Union-find map.  Declared as a short for speed.
314   // Indexed by live-range number, it returns the compacted live-range number
315   LRG_List _uf_map;

275   void Union( uint a, uint b );
276   // Test for edge in Squared-up matrix
277   int test_edge_sq( uint a, uint b ) const;
278   // Yank a Node and all connected edges from the IFG.  Be prepared to
279   // re-insert the yanked Node in reverse order of yanking.  Return a
280   // list of neighbors (edges) yanked.
281   IndexSet *remove_node( uint a );
282   // Reinsert a yanked Node
283   void re_insert( uint a );
284   // Return set of neighbors
285   IndexSet *neighbors( uint a ) const { return &_adjs[a]; }
286 
287 #ifndef PRODUCT
288   // Dump the IFG
289   void dump() const;
290   void stats() const;
291   void verify( const PhaseChaitin * ) const;
292 #endif
293 
294   //--------------- Live Range Accessors
295   LRG &lrgs(uint idx) const { assert(idx < _maxlrg, "oob: index %u not smaller than %u", idx, _maxlrg); return _lrgs[idx]; }
296 
297   // Compute and set effective degree.  Might be folded into SquareUp().
298   void Compute_Effective_Degree();
299 
300   // Compute effective degree as the sum of neighbors' _sizes.
301   int effective_degree( uint lidx ) const;
302 };
303 
304 // The LiveRangeMap class is responsible for storing node to live range id mapping.
305 // Each node is mapped to a live range id (a virtual register). Nodes that are
306 // not considered for register allocation are given live range id 0.
307 class LiveRangeMap {
308 
309 private:
310 
311   uint _max_lrg_id;
312 
313   // Union-find map.  Declared as a short for speed.
314   // Indexed by live-range number, it returns the compacted live-range number
315   LRG_List _uf_map;
< prev index next >