public final class OptGCMap extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
static int |
ERROR |
static int |
FIRST_GCMAP_REG |
private int[] |
gcMapInformation
The gc map array, a sequence of gc maps.
|
static int |
INITIAL_MAP_SIZE
The initial allocation size for a map
|
static int |
LAST_GCMAP_REG |
private int |
lastGCMapEntry
the index of the last map entry in use
|
private static int |
NEXT_BIT
bit pattern for the "next" bit in the GC maps array
|
static int |
NO_MAP_ENTRY |
Constructor and Description |
---|
OptGCMap()
Constructor, called during compilation
|
Modifier and Type | Method and Description |
---|---|
private void |
addAllSpills(int[] spillArray)
If we will be looking for missed references we need to sort the list
of spills and then add them to the map, otherwise, nothing to do
|
private void |
addSpillLocation(int spill)
Adds the passed spill value to the current map
|
static void |
dumpMap(int entry,
int[] gcMap)
Dumps the GCmap that starts at entry.
|
private int |
endCurrentMap(int firstIndex)
Ends the current map
|
int[] |
finish()
Completes the encoding of the map.
|
static int |
gcMapInformation(int mapEntry,
int[] gcMap) |
int |
generateGCMapEntry(GCIRMapElement irMapElem)
Construct the GCMap for the argument GCIRMapElement
|
private int |
getNextMapEntry()
Returns the next GC map entry for use
|
private static int |
getRegBitPosition(int registerNumber) |
private static boolean |
nextBitSet(int entry,
int[] gcMap)
Determines if the next bit is set for the entry passed in the gc map passed
|
static int |
nextLocation(int currentIndex,
int[] gcMap) |
static boolean |
registerIsSet(int entry,
int registerNumber,
int[] gcMap) |
private void |
resizeMapInformation(int newSize)
Resize the map array
|
private int |
setRegisterBitMap(int bitMap)
Sets the register map information at the next available entry
|
public static final int NO_MAP_ENTRY
public static final int ERROR
public static final int INITIAL_MAP_SIZE
private static final int NEXT_BIT
private int lastGCMapEntry
private int[] gcMapInformation
public static final boolean DEBUG
public static final int FIRST_GCMAP_REG
public static final int LAST_GCMAP_REG
OptGCMap()
public int[] finish()
public int generateGCMapEntry(GCIRMapElement irMapElem)
irMapElem
- The IR Map element to create a GCMap forpublic static int gcMapInformation(int mapEntry, int[] gcMap)
public static boolean registerIsSet(int entry, int registerNumber, int[] gcMap)
public static int nextLocation(int currentIndex, int[] gcMap)
currentIndex
- the index of the current locationgcMap
- the encoded GCMapprivate static int getRegBitPosition(int registerNumber)
private static boolean nextBitSet(int entry, int[] gcMap)
entry
- the entry (index) to checkgcMap
- the gcmappublic static void dumpMap(int entry, int[] gcMap)
entry
- the entry where the map beginsgcMap
- the encoded GCmapsprivate int getNextMapEntry()
private void resizeMapInformation(int newSize)
newSize
- the new size for the map arrayprivate int setRegisterBitMap(int bitMap)
bitMap
- map entryprivate void addAllSpills(int[] spillArray)
spillArray
- an array of spillsprivate void addSpillLocation(int spill)
spill
- the spill locationprivate int endCurrentMap(int firstIndex)
firstIndex
- the index of the beginning of the map