Mercurial > hg > truffle
comparison src/share/vm/opto/chaitin.hpp @ 8728:056ab43544a4
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
author | neliasso |
---|---|
date | Wed, 13 Mar 2013 10:56:54 +0100 |
parents | a1c7f6472621 |
children | 8373c19be854 |
comparison
equal
deleted
inserted
replaced
8708:8196357e95b5 | 8728:056ab43544a4 |
---|---|
185 #ifndef PRODUCT | 185 #ifndef PRODUCT |
186 void dump( ) const; | 186 void dump( ) const; |
187 #endif | 187 #endif |
188 }; | 188 }; |
189 | 189 |
190 //------------------------------LRG_List--------------------------------------- | |
191 // Map Node indices to Live RanGe indices. | |
192 // Array lookup in the optimized case. | |
193 class LRG_List : public ResourceObj { | |
194 friend class VMStructs; | |
195 uint _cnt, _max; | |
196 uint* _lidxs; | |
197 ReallocMark _nesting; // assertion check for reallocations | |
198 public: | |
199 LRG_List( uint max ); | |
200 | |
201 uint lookup( uint nidx ) const { | |
202 return _lidxs[nidx]; | |
203 } | |
204 uint operator[] (uint nidx) const { return lookup(nidx); } | |
205 | |
206 void map( uint nidx, uint lidx ) { | |
207 assert( nidx < _cnt, "oob" ); | |
208 _lidxs[nidx] = lidx; | |
209 } | |
210 void extend( uint nidx, uint lidx ); | |
211 | |
212 uint Size() const { return _cnt; } | |
213 }; | |
214 | |
215 //------------------------------IFG-------------------------------------------- | 190 //------------------------------IFG-------------------------------------------- |
216 // InterFerence Graph | 191 // InterFerence Graph |
217 // An undirected graph implementation. Created with a fixed number of | 192 // An undirected graph implementation. Created with a fixed number of |
218 // vertices. Edges can be added & tested. Vertices can be removed, then | 193 // vertices. Edges can be added & tested. Vertices can be removed, then |
219 // added back later with all edges intact. Can add edges between one vertex | 194 // added back later with all edges intact. Can add edges between one vertex |