public final class GCIRMap extends Object implements Iterable<GCIRMapElement>
Modifier and Type | Field and Description |
---|---|
private static boolean |
DEBUG
Used for class-wide debugging
|
private LinkedListRVM<GCIRMapElement> |
list
This is the list of maps.
|
Constructor and Description |
---|
GCIRMap() |
Modifier and Type | Method and Description |
---|---|
int |
countNumSpillElements()
Calculates the number of spill entries in this GCIRMap
This is the total number of spills for all instructions
in this map.
|
List<RegSpillListElement> |
createDU(LiveSet set)
TODO What is this method doing in this class ??
|
void |
delete(Instruction inst)
This method removes an entry in the GCIRMap that is specified
by inst.
|
void |
dump()
dumps the map
|
int |
getNumInstructionMaps()
returns the number of GC points in this map, i.e., the number of
instructions we have maps for.
|
void |
insert(Instruction inst,
List<RegSpillListElement> regList)
This method inserts a new entry into the GCIRMap
|
void |
insertTwin(Instruction inst,
Instruction twin)
This method inserts an entry for a "twin" instruction immediately after the
original entry.
|
Iterator<GCIRMapElement> |
iterator() |
void |
moveToEnd(Instruction inst)
This method moves an entry in the GCIRMap that is specified
by inst to the end of the list.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
private final LinkedListRVM<GCIRMapElement> list
private static final boolean DEBUG
public GCIRMap()
public int getNumInstructionMaps()
public int countNumSpillElements()
public List<RegSpillListElement> createDU(LiveSet set)
set
- the set of registers, encoded as a LiveSet objectpublic void insert(Instruction inst, List<RegSpillListElement> regList)
inst
- the IR instruction we care aboutregList
- the set of symbolic registers as a listpublic void delete(Instruction inst)
inst
- the IR instruction we want to removepublic void moveToEnd(Instruction inst)
inst
- the IR instruction we want to removepublic void insertTwin(Instruction inst, Instruction twin)
inst
- the original IR instructiontwin
- the new twin IR instructionpublic Iterator<GCIRMapElement> iterator()
iterator
in interface Iterable<GCIRMapElement>
public void dump()