harpoon.Analysis.Instr
Class LocalCffRegAlloc

java.lang.Object
  extended by harpoon.Analysis.Instr.RegAlloc
      extended by harpoon.Analysis.Instr.LocalCffRegAlloc

public class LocalCffRegAlloc
extends RegAlloc

LocalCffRegAlloc performs Local Register Allocation for a given set of Instrs 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>

Nested Class Summary
static class LocalCffRegAlloc.PreassignTemp
          PreassignTemp represents Temps which have been pre-assigned to machine registers.
 
Nested classes/interfaces inherited from class harpoon.Analysis.Instr.RegAlloc
RegAlloc.Factory, RegAlloc.IntermediateCode, RegAlloc.IntermediateCodeFactory, RegAlloc.RestoreProxy, RegAlloc.SpillLoad, RegAlloc.SpillProxy, RegAlloc.SpillStore
 
Field Summary
static RegAlloc.Factory FACTORY
           
 
Fields inherited from class harpoon.Analysis.Instr.RegAlloc
bbFact, checked, code, DEBUG, frame, GLOBAL, LOCAL, TIME
 
Constructor Summary
LocalCffRegAlloc(Code code)
          Creates a LocalCffRegAlloc.
 
Method Summary
protected  void generateRegAssignment()
          Assigns registers in the code for this.
protected  Derivation getDerivation()
          returns a Derivation for analyses to use on the register-allocated code.
 List list(Temp t)
           
 List list(Temp t1, Temp t2)
           
 
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
 

Field Detail

FACTORY

public static RegAlloc.Factory FACTORY
Constructor Detail

LocalCffRegAlloc

public LocalCffRegAlloc(Code code)
Creates a LocalCffRegAlloc.

Method Detail

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 SpillLoads and SpillStores; 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)