class SpillLocationManager extends Object
Modifier and Type | Field and Description |
---|---|
(package private) HashSet<SpillLocationInterval> |
freeIntervals
Set of spill locations which were previously allocated, but may be
free since the assigned register is no longer live.
|
private IR |
ir
The governing IR
|
Constructor and Description |
---|
SpillLocationManager(IR ir) |
Modifier and Type | Method and Description |
---|---|
(package private) SpillLocationInterval |
findOrCreateSpillLocation(CompoundInterval ci) |
(package private) void |
freeInterval(SpillLocationInterval i)
Records that a particular interval is potentially available for
reuse.
|
(package private) SpillLocationInterval |
getSpillPreference(CompoundInterval ci,
int spillSize,
int type)
Given the current state of the register allocator, compute the
available spill location to which ci has the highest preference.
|
final HashSet<SpillLocationInterval> freeIntervals
SpillLocationManager(IR ir)
SpillLocationInterval findOrCreateSpillLocation(CompoundInterval ci)
ci
- a compound interval that we want to spillvoid freeInterval(SpillLocationInterval i)
i
- the interval to freeSpillLocationInterval getSpillPreference(CompoundInterval ci, int spillSize, int type)
ci
- the interval to spillspillSize
- the size of spill location neededtype
- the physical register's type