equal
deleted
inserted
replaced
38 class IndexSet; |
38 class IndexSet; |
39 |
39 |
40 //------------------------------LRG_List--------------------------------------- |
40 //------------------------------LRG_List--------------------------------------- |
41 // Map Node indices to Live RanGe indices. |
41 // Map Node indices to Live RanGe indices. |
42 // Array lookup in the optimized case. |
42 // Array lookup in the optimized case. |
43 class LRG_List : public ResourceObj { |
43 typedef GrowableArray<uint> LRG_List; |
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 }; |
|
64 |
44 |
65 //------------------------------PhaseLive-------------------------------------- |
45 //------------------------------PhaseLive-------------------------------------- |
66 // Compute live-in/live-out |
46 // Compute live-in/live-out |
67 class PhaseLive : public Phase { |
47 class PhaseLive : public Phase { |
68 // Array of Sets of values live at the start of a block. |
48 // Array of Sets of values live at the start of a block. |