8009721: Make PhaseLive independent from regalloc
authorneliasso
Wed, 13 Mar 2013 10:56:54 +0100
changeset 15944 095248beb690
parent 15924 d01b3a588e24
child 15945 73ed3a806ec6
8009721: Make PhaseLive independent from regalloc Summary: Moved class definition of LRG_List from chaitin.hpp to live.hpp Reviewed-by: kvn, rbackman, roland Contributed-by: niclas.adlertz@oracle.com
hotspot/src/share/vm/opto/chaitin.hpp
hotspot/src/share/vm/opto/live.hpp
--- a/hotspot/src/share/vm/opto/chaitin.hpp	Fri Mar 08 08:22:18 2013 -0800
+++ b/hotspot/src/share/vm/opto/chaitin.hpp	Wed Mar 13 10:56:54 2013 +0100
@@ -187,31 +187,6 @@
 #endif
 };
 
-//------------------------------LRG_List---------------------------------------
-// Map Node indices to Live RanGe indices.
-// Array lookup in the optimized case.
-class LRG_List : public ResourceObj {
-  friend class VMStructs;
-  uint _cnt, _max;
-  uint* _lidxs;
-  ReallocMark _nesting;         // assertion check for reallocations
-public:
-  LRG_List( uint max );
-
-  uint lookup( uint nidx ) const {
-    return _lidxs[nidx];
-  }
-  uint operator[] (uint nidx) const { return lookup(nidx); }
-
-  void map( uint nidx, uint lidx ) {
-    assert( nidx < _cnt, "oob" );
-    _lidxs[nidx] = lidx;
-  }
-  void extend( uint nidx, uint lidx );
-
-  uint Size() const { return _cnt; }
-};
-
 //------------------------------IFG--------------------------------------------
 //                         InterFerence Graph
 // An undirected graph implementation.  Created with a fixed number of
--- a/hotspot/src/share/vm/opto/live.hpp	Fri Mar 08 08:22:18 2013 -0800
+++ b/hotspot/src/share/vm/opto/live.hpp	Wed Mar 13 10:56:54 2013 +0100
@@ -33,11 +33,35 @@
 #include "opto/regmask.hpp"
 
 class Block;
-class LRG_List;
 class PhaseCFG;
 class VectorSet;
 class IndexSet;
 
+//------------------------------LRG_List---------------------------------------
+// Map Node indices to Live RanGe indices.
+// Array lookup in the optimized case.
+class LRG_List : public ResourceObj {
+  friend class VMStructs;
+  uint _cnt, _max;
+  uint* _lidxs;
+  ReallocMark _nesting;         // assertion check for reallocations
+public:
+  LRG_List( uint max );
+
+  uint lookup( uint nidx ) const {
+    return _lidxs[nidx];
+  }
+  uint operator[] (uint nidx) const { return lookup(nidx); }
+
+  void map( uint nidx, uint lidx ) {
+    assert( nidx < _cnt, "oob" );
+    _lidxs[nidx] = lidx;
+  }
+  void extend( uint nidx, uint lidx );
+
+  uint Size() const { return _cnt; }
+};
+
 //------------------------------PhaseLive--------------------------------------
 // Compute live-in/live-out
 class PhaseLive : public Phase {