org.jikesrvm.compilers.opt.regalloc
Class RegisterAllocatorState

java.lang.Object
  extended by org.jikesrvm.compilers.opt.regalloc.RegisterAllocatorState

public class RegisterAllocatorState
extends Object

The register allocator currently caches a bunch of state in the IR; This class provides accessors to this state. TODO: Consider caching the state in a lookaside structure. TODO: Currently, the physical registers are STATIC! fix this.


Constructor Summary
RegisterAllocatorState()
           
 
Method Summary
(package private) static void clearOneToOne(Register r)
          Clear any 1-to-1 mapping for register R.
(package private) static Register getMapping(Register r)
           
static int getSpill(Register reg)
           
(package private) static void mapOneToOne(Register A, Register B)
          Record that register A and register B are associated with each other in a bijection.
(package private) static void resetPhysicalRegisters(IR ir)
          Resets the physical register info
(package private) static void setSpill(Register reg, int spill)
          Special use of scratchObject field as "resurrect lists" for real registers TODO: use another field for safety; scratchObject is also used by clan LinearScanLiveAnalysis
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegisterAllocatorState

public RegisterAllocatorState()
Method Detail

resetPhysicalRegisters

static void resetPhysicalRegisters(IR ir)
Resets the physical register info


setSpill

static void setSpill(Register reg,
                     int spill)
Special use of scratchObject field as "resurrect lists" for real registers TODO: use another field for safety; scratchObject is also used by clan LinearScanLiveAnalysis


getSpill

public static int getSpill(Register reg)

mapOneToOne

static void mapOneToOne(Register A,
                        Register B)
Record that register A and register B are associated with each other in a bijection. The register allocator uses this state to indicate that a symbolic register is presently allocated to a physical register.


getMapping

static Register getMapping(Register r)
Returns:
the register currently mapped 1-to-1 to r

clearOneToOne

static void clearOneToOne(Register r)
Clear any 1-to-1 mapping for register R.