org.jikesrvm.compilers.opt.regalloc
Class GenericRegisterPreferences

java.lang.Object
  extended by org.jikesrvm.compilers.opt.regalloc.GenericRegisterPreferences
Direct Known Subclasses:
RegisterPreferences

public abstract class GenericRegisterPreferences
extends Object

This class helps manage register preferences for coalescing and register allocation.


Field Summary
private  CoalesceGraph graph
          The main backing data structure;
 
Constructor Summary
GenericRegisterPreferences()
           
 
Method Summary
protected  void addAffinity(int w, Register r1, Register r2)
          Add a affinity of weight w between two registers.
 CoalesceGraph getGraph()
          Return the backing graph holding the preferences.
abstract  void initialize(IR ir)
          Set up register preferences for an IR.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

graph

private final CoalesceGraph graph
The main backing data structure;

Constructor Detail

GenericRegisterPreferences

public GenericRegisterPreferences()
Method Detail

addAffinity

protected void addAffinity(int w,
                           Register r1,
                           Register r2)
Add a affinity of weight w between two registers.


initialize

public abstract void initialize(IR ir)
Set up register preferences for an IR. This is machine-dependent.


getGraph

public CoalesceGraph getGraph()
Return the backing graph holding the preferences.