|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.runtimesupport.OptGCMap
public final class OptGCMap
A class that encapsulates the GCMap portion of the machine code maps. An instance of this class is created to encode and instance of a GCIRMap into an int[]. The int[] is stored persistently, but the instance of the OptGCMap is NOT.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.jikesrvm.ia32.RegisterConstants |
---|
RegisterConstants.FloatingPointMachineRegister, RegisterConstants.FPR, RegisterConstants.GPR, RegisterConstants.MachineRegister, RegisterConstants.MM, RegisterConstants.XMM |
Field Summary | |
---|---|
static boolean |
DEBUG
|
static int |
ERROR
|
private int[] |
gcMapInformation
The gc map array, a sequence of gc maps. |
static int |
INITIAL_MAP_SIZE
The initial allocation size for a map |
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
|
Fields inherited from interface org.jikesrvm.compilers.opt.runtimesupport.ia32.OptGCMapIteratorConstants |
---|
FIRST_GCMAP_REG, LAST_GCMAP_REG |
Fields inherited from interface org.jikesrvm.compilers.opt.regalloc.ia32.PhysicalRegisterConstants |
---|
AF, C0, C1, C2, C3, CF, CONDITION_VALUE, DOUBLE_REG, DOUBLE_VALUE, FIRST_DOUBLE, FIRST_INT, FIRST_SPECIAL, FLOAT_VALUE, INT_REG, INT_VALUE, NUM_SPECIALS, NUMBER_TYPE, OF, PF, SF, SPECIAL_REG, ST0, ST1, ZF |
Fields inherited from interface org.jikesrvm.ia32.RegisterConstants |
---|
ALL_FPRS, ALL_GPRS, EAX, EBP, EBX, ECX, EDI, EDX, ESI, ESP, FP0, FP1, FP2, FP3, FP4, FP5, FP6, FP7, INSTRUCTION_WIDTH, LG_INSTRUCTION_WIDTH, MM0, MM1, MM10, MM11, MM12, MM13, MM14, MM15, MM2, MM3, MM4, MM5, MM6, MM7, MM8, MM9, NATIVE_NONVOLATILE_FPRS, NATIVE_NONVOLATILE_GPRS, NATIVE_PARAMETER_FPRS, NATIVE_PARAMETER_GPRS, NATIVE_VOLATILE_FPRS, NATIVE_VOLATILE_GPRS, NONVOLATILE_FPRS, NONVOLATILE_GPRS, NUM_FPRS, NUM_GPRS, NUM_NONVOLATILE_FPRS, NUM_NONVOLATILE_GPRS, NUM_PARAMETER_FPRS, NUM_PARAMETER_GPRS, NUM_RETURN_FPRS, NUM_RETURN_GPRS, NUM_VOLATILE_FPRS, NUM_VOLATILE_GPRS, PARAMETER_FPRS, PARAMETER_GPRS, R0, R1, R10, R11, R12, R13, R14, R15, R2, R3, R4, R5, R6, R7, R8, R9, RETURN_FPRS, RETURN_GPRS, STACK_POINTER, THREAD_REGISTER, VOLATILE_FPRS, VOLATILE_GPRS, XMM0, XMM1, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, XMM8, XMM9 |
Constructor Summary | |
---|---|
OptGCMap()
Constructor, called during compilation |
Method Summary | |
---|---|
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()
Called to complete the encoding and return the final int[] |
static int |
gcMapInformation(int entry,
int[] gcMap)
Returns the GC map information for the GC map information entry passed |
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)
This method maps a register number to its bit position |
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)
Determines if the register map information for the entry passed is true |
private void |
resizeMapInformation(int newSize)
Resize the map array |
private int |
setRegisterBitMap(int bitMap)
Sets the register map information at the next available entry |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
OptGCMap()
Method Detail |
---|
public int[] finish()
public int generateGCMapEntry(GCIRMapElement irMapElem)
irMapElem
- The IR Map element to create a GCMap for
public static int gcMapInformation(int entry, int[] gcMap)
entry
- map entrygcMap
- the gc mappublic static boolean registerIsSet(int entry, int registerNumber, int[] gcMap)
entry
- map entryregisterNumber
- the register numbergcMap
- the encoded GCMappublic static int nextLocation(int currentIndex, int[] gcMap)
gcMap
- the encoded GCMap
private static int getRegBitPosition(int registerNumber)
registerNumber
- the register number of interestprivate static boolean nextBitSet(int entry, int[] gcMap)
entry
- the entry (index) to checkgcMap
- the gcmap
public 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 entry
private 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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |