org.jikesrvm.compilers.opt.regalloc
Class SpillCostEstimator
java.lang.Object
org.jikesrvm.compilers.opt.regalloc.SpillCostEstimator
- Direct Known Subclasses:
- BlockCountSpillCost, BrainDeadSpillCost, SimpleSpillCost
abstract class SpillCostEstimator
- extends Object
An object that returns an estimate of the relative cost of spilling a
symbolic register.
Method Summary |
(package private) abstract void |
calculate(IR ir)
Calculate the estimated cost for each register. |
(package private) double |
getCost(Register r)
Return a number that represents an estimate of the relative cost of
spilling register r. |
protected void |
update(Register r,
double delta)
Update the cost for a particular register. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
map
private final HashMap<Register,Double> map
SpillCostEstimator
SpillCostEstimator()
getCost
double getCost(Register r)
- Return a number that represents an estimate of the relative cost of
spilling register r.
calculate
abstract void calculate(IR ir)
- Calculate the estimated cost for each register.
update
protected void update(Register r,
double delta)
- Update the cost for a particular register.