harpoon.Analysis.Instr
Class LocalCffRegAlloc
java.lang.Object
harpoon.Analysis.Instr.RegAlloc
harpoon.Analysis.Instr.LocalCffRegAlloc
public class LocalCffRegAlloc
- extends RegAlloc
LocalCffRegAlloc
performs
Local Register Allocation for a given set of
Instr
s using a conservative-furthest-first algorithm.
The papers
"On Local Register Allocation" and "Hardness and
Algorithms for Local Register Allocation" lay out the basis
for the algorithm it uses to allocate and assign registers.
- Version:
- $Id: LocalCffRegAlloc.java,v 1.7 2004/02/08 04:55:22 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 |
FACTORY
public static RegAlloc.Factory FACTORY
LocalCffRegAlloc
public LocalCffRegAlloc(Code code)
- Creates a
LocalCffRegAlloc
.
getDerivation
protected Derivation getDerivation()
- Description copied from class:
RegAlloc
- returns a
Derivation
for analyses to use on the
register-allocated code. This allows for register allocation
routines to make transformations on the code and still allow
Derivation information to propagate to later analyses.
requires:
this.generateRegAssignment()
has been
called.
- 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()
list
public List list(Temp t)
list
public List list(Temp t1,
Temp t2)