harpoon.Analysis.Instr
Class DemandDrivenRegAlloc
java.lang.Object
harpoon.Analysis.Instr.RegAlloc
harpoon.Analysis.Instr.DemandDrivenRegAlloc
public class DemandDrivenRegAlloc
- extends RegAlloc
DemandDrivenRegAlloc
performs
Demand-Driven Register Allocation for a set of
Instr
s in a Code
.
- Version:
- $Id: DemandDrivenRegAlloc.java,v 1.2 2002/02/25 20:57:30 cananian Exp $
- Author:
- Felix S. Klock II <pnkfelix@mit.edu>
Methods inherited from class harpoon.Analysis.Instr.RegAlloc |
abstractSpillFactory, abstractSpillFactory, allRegs, back, codeFactory, codeFactory, computeBasicBlocks, concreteSpillFactory, expand, fixupSpillCode, getBack, getGrapherFor, getUseDeferFor, hasRegister, isRegister, lastUse, reachableInstrs, replace, resolveOutstandingTemps, rfi |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DemandDrivenRegAlloc
protected DemandDrivenRegAlloc(Code code)
- Creates a
DemandDrivenRegAlloc
.
Design Issue: should there be a RegAlloc object
for every method, or just for every machine target? For
now it seems associating a new one with every method will
save a lot of headaches.
requires:
1. Local register allocation has been run on
code
already.
getDerivation
protected Derivation getDerivation()
- stub implementation.
- Specified by:
getDerivation
in class RegAlloc
generateRegAssignment
protected void generateRegAssignment()
- Description copied from class:
RegAlloc
- Assigns registers in the code for
this
.
effects: Partially or completely allocates
registers for the values defined and used in the code for
this
. Values will be preserved in the code;
any live value will be stored before its assigned
register is overwritten.
Loads and Stores in general
are added in the form of SpillLoad
s and
SpillStore
s; the main RegAlloc
class will use resolveOutstandingTemps()
to replace these "fake" loads and stores with frame
specified Memory instructions.
- Specified by:
generateRegAssignment
in class RegAlloc
- See Also:
RegAlloc.resolveOutstandingTemps()