org.jikesrvm.compilers.opt.ir
Class GCIRMapElement

java.lang.Object
  extended by org.jikesrvm.compilers.opt.ir.GCIRMapElement

public final class GCIRMapElement
extends Object

This class holds each element in the GCIRMap


Field Summary
private  Instruction inst
          The instruction, i.e., GC point
private  List<RegSpillListElement> regSpillList
          The list of references (either symbolic regs or physical regs & spills)
 
Constructor Summary
GCIRMapElement(Instruction inst, List<RegSpillListElement> regSpillList)
          Constructor
 
Method Summary
 void addRegSpillElement(RegSpillListElement e)
          Add a new spill list element for this map element
 int countNumElements()
          Counts and returns the number of references for this map
 int countNumRegElements()
          Counts and returns the number of register elements (not spills) for this entry
 int countNumSpillElements()
          Counts and returns the number of spill for this entry
 GCIRMapElement createTwin(Instruction inst)
          Create a twin entry: required when the same MIR GC point is split into two instructions, both of which are PEIs after register allocation/GCIRMap creation.
 void deleteRegSpillElement(RegSpillListElement e)
          Delete a spill list element from this map element
 Instruction getInstruction()
          return the instruction with this entry
 List<RegSpillListElement> regSpillList()
          returns an enumerator to access the registers/spills for this entry
 String toString()
          Return a string version of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

inst

private final Instruction inst
The instruction, i.e., GC point


regSpillList

private final List<RegSpillListElement> regSpillList
The list of references (either symbolic regs or physical regs & spills)

Constructor Detail

GCIRMapElement

public GCIRMapElement(Instruction inst,
                      List<RegSpillListElement> regSpillList)
Constructor

Parameters:
inst - the instruction of interest
regSpillList - the list of references either symbolic (before regalloc) or physical/spill location (after regalloc)
Method Detail

createTwin

public GCIRMapElement createTwin(Instruction inst)
Create a twin entry: required when the same MIR GC point is split into two instructions, both of which are PEIs after register allocation/GCIRMap creation.


getInstruction

public Instruction getInstruction()
return the instruction with this entry

Returns:
the instruction with this entry

regSpillList

public List<RegSpillListElement> regSpillList()
returns an enumerator to access the registers/spills for this entry

Returns:
an enumerator to access the registers/spills for this entry

addRegSpillElement

public void addRegSpillElement(RegSpillListElement e)
Add a new spill list element for this map element


deleteRegSpillElement

public void deleteRegSpillElement(RegSpillListElement e)
Delete a spill list element from this map element


countNumElements

public int countNumElements()
Counts and returns the number of references for this map

Returns:
the number of references, either regs or spills for this map

countNumRegElements

public int countNumRegElements()
Counts and returns the number of register elements (not spills) for this entry

Returns:
the number of register elements for this entry

countNumSpillElements

public int countNumSpillElements()
Counts and returns the number of spill for this entry

Returns:
the number of spill for this entry

toString

public String toString()
Return a string version of this object

Overrides:
toString in class Object
Returns:
a string version of this object