8009721: Make PhaseLive independent from regalloc

Wed, 13 Mar 2013 10:56:54 +0100

author
neliasso
date
Wed, 13 Mar 2013 10:56:54 +0100
changeset 4728
056ab43544a4
parent 4708
8196357e95b5
child 4729
6d98efabf3ba

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

src/share/vm/opto/chaitin.hpp file | annotate | diff | comparison | revisions
src/share/vm/opto/live.hpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/opto/chaitin.hpp	Fri Mar 08 08:22:18 2013 -0800
     1.2 +++ b/src/share/vm/opto/chaitin.hpp	Wed Mar 13 10:56:54 2013 +0100
     1.3 @@ -187,31 +187,6 @@
     1.4  #endif
     1.5  };
     1.6  
     1.7 -//------------------------------LRG_List---------------------------------------
     1.8 -// Map Node indices to Live RanGe indices.
     1.9 -// Array lookup in the optimized case.
    1.10 -class LRG_List : public ResourceObj {
    1.11 -  friend class VMStructs;
    1.12 -  uint _cnt, _max;
    1.13 -  uint* _lidxs;
    1.14 -  ReallocMark _nesting;         // assertion check for reallocations
    1.15 -public:
    1.16 -  LRG_List( uint max );
    1.17 -
    1.18 -  uint lookup( uint nidx ) const {
    1.19 -    return _lidxs[nidx];
    1.20 -  }
    1.21 -  uint operator[] (uint nidx) const { return lookup(nidx); }
    1.22 -
    1.23 -  void map( uint nidx, uint lidx ) {
    1.24 -    assert( nidx < _cnt, "oob" );
    1.25 -    _lidxs[nidx] = lidx;
    1.26 -  }
    1.27 -  void extend( uint nidx, uint lidx );
    1.28 -
    1.29 -  uint Size() const { return _cnt; }
    1.30 -};
    1.31 -
    1.32  //------------------------------IFG--------------------------------------------
    1.33  //                         InterFerence Graph
    1.34  // An undirected graph implementation.  Created with a fixed number of
     2.1 --- a/src/share/vm/opto/live.hpp	Fri Mar 08 08:22:18 2013 -0800
     2.2 +++ b/src/share/vm/opto/live.hpp	Wed Mar 13 10:56:54 2013 +0100
     2.3 @@ -33,11 +33,35 @@
     2.4  #include "opto/regmask.hpp"
     2.5  
     2.6  class Block;
     2.7 -class LRG_List;
     2.8  class PhaseCFG;
     2.9  class VectorSet;
    2.10  class IndexSet;
    2.11  
    2.12 +//------------------------------LRG_List---------------------------------------
    2.13 +// Map Node indices to Live RanGe indices.
    2.14 +// Array lookup in the optimized case.
    2.15 +class LRG_List : public ResourceObj {
    2.16 +  friend class VMStructs;
    2.17 +  uint _cnt, _max;
    2.18 +  uint* _lidxs;
    2.19 +  ReallocMark _nesting;         // assertion check for reallocations
    2.20 +public:
    2.21 +  LRG_List( uint max );
    2.22 +
    2.23 +  uint lookup( uint nidx ) const {
    2.24 +    return _lidxs[nidx];
    2.25 +  }
    2.26 +  uint operator[] (uint nidx) const { return lookup(nidx); }
    2.27 +
    2.28 +  void map( uint nidx, uint lidx ) {
    2.29 +    assert( nidx < _cnt, "oob" );
    2.30 +    _lidxs[nidx] = lidx;
    2.31 +  }
    2.32 +  void extend( uint nidx, uint lidx );
    2.33 +
    2.34 +  uint Size() const { return _cnt; }
    2.35 +};
    2.36 +
    2.37  //------------------------------PhaseLive--------------------------------------
    2.38  // Compute live-in/live-out
    2.39  class PhaseLive : public Phase {

mercurial