Mercurial > hg > graal-compiler
comparison src/share/vm/opto/live.hpp @ 12254:8c83625e3a53
8024646: Remove LRG_List container, replace it with GrowableArray
Summary: We already have GrowableArray, use it instead of LRG_List
Reviewed-by: kvn
author | adlertz |
---|---|
date | Thu, 12 Sep 2013 23:13:45 +0200 |
parents | 8373c19be854 |
children | de6a9e811145 |
comparison
equal
deleted
inserted
replaced
12192:34bd5e86aadb | 12254:8c83625e3a53 |
---|---|
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. |