src/share/vm/opto/live.hpp

changeset 4728
056ab43544a4
parent 2314
f95d63e2154a
child 4949
8373c19be854
equal deleted inserted replaced
4708:8196357e95b5 4728:056ab43544a4
31 #include "opto/indexSet.hpp" 31 #include "opto/indexSet.hpp"
32 #include "opto/phase.hpp" 32 #include "opto/phase.hpp"
33 #include "opto/regmask.hpp" 33 #include "opto/regmask.hpp"
34 34
35 class Block; 35 class Block;
36 class LRG_List;
37 class PhaseCFG; 36 class PhaseCFG;
38 class VectorSet; 37 class VectorSet;
39 class IndexSet; 38 class IndexSet;
39
40 //------------------------------LRG_List---------------------------------------
41 // Map Node indices to Live RanGe indices.
42 // Array lookup in the optimized case.
43 class LRG_List : public ResourceObj {
44 friend class VMStructs;
45 uint _cnt, _max;
46 uint* _lidxs;
47 ReallocMark _nesting; // assertion check for reallocations
48 public:
49 LRG_List( uint max );
50
51 uint lookup( uint nidx ) const {
52 return _lidxs[nidx];
53 }
54 uint operator[] (uint nidx) const { return lookup(nidx); }
55
56 void map( uint nidx, uint lidx ) {
57 assert( nidx < _cnt, "oob" );
58 _lidxs[nidx] = lidx;
59 }
60 void extend( uint nidx, uint lidx );
61
62 uint Size() const { return _cnt; }
63 };
40 64
41 //------------------------------PhaseLive-------------------------------------- 65 //------------------------------PhaseLive--------------------------------------
42 // Compute live-in/live-out 66 // Compute live-in/live-out
43 class PhaseLive : public Phase { 67 class PhaseLive : public Phase {
44 // Array of Sets of values live at the start of a block. 68 // Array of Sets of values live at the start of a block.

mercurial