org.jikesrvm.compilers.opt.ir
Class Register

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

public final class Register
extends Object

Represents a symbolic or physical register. Registers are shared among all Operands -- for a given register pool, there is only one instance of an Register with each number.

See Also:
RegisterOperand, ArchitectureSpecificOpt.RegisterPool

Field Summary
private static int ADDRESS
           
static int ADDRESS_TYPE
           
private static int ALLOCATED
           
private static int CONDITION
           
static int CONDITION_TYPE
           
 RegisterOperand defList
          Used to store register lists.
private static int DOUBLE
           
static int DOUBLE_TYPE
           
private static int EXCLUDE_LIVEANAL
           
private  int flags
          Encoding of register properties & scratch bits
private static int FLOAT
           
static int FLOAT_TYPE
           
private static int INTEGER
           
static int INTEGER_TYPE
           
private static int LOCAL
           
private static int LONG
           
static int LONG_TYPE
           
 Register mapsToRegister
           
(package private)  Register next
           
private static int NON_VOLATILE
           
 int number
          Index number relative to register pool.
private static int PHYSICAL
           
private static int PINNED
           
(package private)  Register prev
           
 int scratch
          A field optimizations can use as they choose
 Object scratchObject
           
private static int SEEN_USE
           
private static int SPAN_BASIC_BLOCK
           
private static int SPILLED
           
private static int SSA
           
private static int TOUCHED
           
private static int TYPE_MASK
           
private static int TYPE_SHIFT
           
 int useCount
          The number of uses; used by flow-insensitive optimizations
 RegisterOperand useList
          Used to store register lists.
private static int VALIDATION
           
static int VALIDATION_TYPE
           
private static int VOLATILE
           
 
Constructor Summary
Register(int Number)
           
 
Method Summary
 void allocateRegister()
           
 void allocateRegister(Register reg)
           
 void allocateToRegister(Register reg)
           
(package private)  void append(Register l)
           
 void clearAddress()
           
 void clearAllocationFlags()
           
 void clearCondition()
           
 void clearDouble()
           
 void clearFloat()
           
 void clearInteger()
           
 void clearLocal()
           
 void clearLong()
           
 void clearPhysical()
           
 void clearSeenUse()
           
 void clearSpansBasicBlock()
           
 void clearSpill()
           
 void clearSSA()
           
 void clearType()
           
 void clearValidation()
           
 void deallocateRegister()
           
 DepGraphNode dNode()
           
 void freeRegister()
           
 Instruction getFirstDef()
          This accessor is only valid when register lists are valid
 Register getNext()
           
 int getNumber()
           
 Register getPrev()
           
 Register getRegisterAllocated()
           
 int getSpillAllocated()
           
 int getType()
           
 int hashCode()
           
 boolean isAddress()
           
 boolean isAllocated()
           
 boolean isAvailable()
           
 boolean isCondition()
           
 boolean isDouble()
           
 boolean isExcludedLiveA()
           
 boolean isFloat()
           
 boolean isFloatingPoint()
           
 boolean isInteger()
           
 boolean isLocal()
           
 boolean isLong()
           
 boolean isNatural()
           
 boolean isNonVolatile()
           
 boolean isPhysical()
           
 boolean isPinned()
           
 boolean isSpilled()
           
 boolean isSSA()
           
 boolean isSymbolic()
           
 boolean isTemp()
           
 boolean isTouched()
           
 boolean isValidation()
           
 boolean isVolatile()
           
 void linkWithNext(Register Next)
           
 void pinRegister()
           
 void putSpansBasicBlock(boolean a)
           
 void putSSA(boolean a)
           
(package private)  Register remove()
           
 void reserveRegister()
           
 boolean seenUse()
           
 void setAddress()
           
 void setCondition()
           
 void setdNode(DepGraphNode a)
          Used in dependence graph construction.
 void setDouble()
           
 void setExcludedLiveA()
           
 void setFloat()
           
 void setInteger()
           
 void setLocal()
           
 void setLong()
           
(package private)  void setNext(Register e)
           
 void setNonVolatile()
           
 void setPhysical()
           
 void setSeenUse()
           
 void setSpansBasicBlock()
           
 void setSSA()
           
 void setValidation()
           
 void setVolatile()
           
 boolean spansBasicBlock()
           
 void spillRegister()
           
 String toString()
          Returns the string representation of this register.
 void touchRegister()
           
 String typeName()
           
 void unpinRegister()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

number

public final int number
Index number relative to register pool.


flags

private int flags
Encoding of register properties & scratch bits


LOCAL

private static final int LOCAL
See Also:
Constant Field Values

SPAN_BASIC_BLOCK

private static final int SPAN_BASIC_BLOCK
See Also:
Constant Field Values

SSA

private static final int SSA
See Also:
Constant Field Values

SEEN_USE

private static final int SEEN_USE
See Also:
Constant Field Values

PHYSICAL

private static final int PHYSICAL
See Also:
Constant Field Values

TYPE_SHIFT

private static final int TYPE_SHIFT
See Also:
Constant Field Values

ADDRESS

private static final int ADDRESS
See Also:
Constant Field Values

INTEGER

private static final int INTEGER
See Also:
Constant Field Values

FLOAT

private static final int FLOAT
See Also:
Constant Field Values

DOUBLE

private static final int DOUBLE
See Also:
Constant Field Values

CONDITION

private static final int CONDITION
See Also:
Constant Field Values

LONG

private static final int LONG
See Also:
Constant Field Values

VALIDATION

private static final int VALIDATION
See Also:
Constant Field Values

VOLATILE

private static final int VOLATILE
See Also:
Constant Field Values

NON_VOLATILE

private static final int NON_VOLATILE
See Also:
Constant Field Values

EXCLUDE_LIVEANAL

private static final int EXCLUDE_LIVEANAL
See Also:
Constant Field Values

SPILLED

private static final int SPILLED
See Also:
Constant Field Values

TOUCHED

private static final int TOUCHED
See Also:
Constant Field Values

ALLOCATED

private static final int ALLOCATED
See Also:
Constant Field Values

PINNED

private static final int PINNED
See Also:
Constant Field Values

TYPE_MASK

private static final int TYPE_MASK
See Also:
Constant Field Values

ADDRESS_TYPE

public static final int ADDRESS_TYPE
See Also:
Constant Field Values

INTEGER_TYPE

public static final int INTEGER_TYPE
See Also:
Constant Field Values

FLOAT_TYPE

public static final int FLOAT_TYPE
See Also:
Constant Field Values

DOUBLE_TYPE

public static final int DOUBLE_TYPE
See Also:
Constant Field Values

CONDITION_TYPE

public static final int CONDITION_TYPE
See Also:
Constant Field Values

LONG_TYPE

public static final int LONG_TYPE
See Also:
Constant Field Values

VALIDATION_TYPE

public static final int VALIDATION_TYPE
See Also:
Constant Field Values

scratchObject

public Object scratchObject

defList

public RegisterOperand defList
Used to store register lists. Computed on demand by IR.computeDU().


useList

public RegisterOperand useList
Used to store register lists. Computed on demand by IR.computeDU().


useCount

public int useCount
The number of uses; used by flow-insensitive optimizations


scratch

public int scratch
A field optimizations can use as they choose


mapsToRegister

public Register mapsToRegister

next

Register next

prev

Register prev
Constructor Detail

Register

public Register(int Number)
Method Detail

isTemp

public boolean isTemp()

isLocal

public boolean isLocal()

spansBasicBlock

public boolean spansBasicBlock()

isSSA

public boolean isSSA()

seenUse

public boolean seenUse()

isPhysical

public boolean isPhysical()

isSymbolic

public boolean isSymbolic()

isAddress

public boolean isAddress()

isInteger

public boolean isInteger()

isLong

public boolean isLong()

isNatural

public boolean isNatural()

isFloat

public boolean isFloat()

isDouble

public boolean isDouble()

isFloatingPoint

public boolean isFloatingPoint()

isCondition

public boolean isCondition()

isValidation

public boolean isValidation()

isExcludedLiveA

public boolean isExcludedLiveA()

getType

public int getType()

isVolatile

public boolean isVolatile()

isNonVolatile

public boolean isNonVolatile()

setLocal

public void setLocal()

setSpansBasicBlock

public void setSpansBasicBlock()

setSSA

public void setSSA()

setSeenUse

public void setSeenUse()

setPhysical

public void setPhysical()

setAddress

public void setAddress()

setInteger

public void setInteger()

setFloat

public void setFloat()

setDouble

public void setDouble()

setLong

public void setLong()

setCondition

public void setCondition()

setValidation

public void setValidation()

setExcludedLiveA

public void setExcludedLiveA()

setVolatile

public void setVolatile()

setNonVolatile

public void setNonVolatile()

putSSA

public void putSSA(boolean a)

putSpansBasicBlock

public void putSpansBasicBlock(boolean a)

clearLocal

public void clearLocal()

clearSpansBasicBlock

public void clearSpansBasicBlock()

clearSSA

public void clearSSA()

clearSeenUse

public void clearSeenUse()

clearPhysical

public void clearPhysical()

clearAddress

public void clearAddress()

clearInteger

public void clearInteger()

clearFloat

public void clearFloat()

clearDouble

public void clearDouble()

clearLong

public void clearLong()

clearCondition

public void clearCondition()

clearType

public void clearType()

clearValidation

public void clearValidation()

setdNode

public void setdNode(DepGraphNode a)
Used in dependence graph construction.


dNode

public DepGraphNode dNode()

getFirstDef

public Instruction getFirstDef()
This accessor is only valid when register lists are valid


getNumber

public int getNumber()

toString

public String toString()
Returns the string representation of this register.

Overrides:
toString in class Object

typeName

public String typeName()

clearAllocationFlags

public void clearAllocationFlags()

pinRegister

public void pinRegister()

reserveRegister

public void reserveRegister()

touchRegister

public void touchRegister()

allocateRegister

public void allocateRegister()

allocateRegister

public void allocateRegister(Register reg)

allocateToRegister

public void allocateToRegister(Register reg)

deallocateRegister

public void deallocateRegister()

freeRegister

public void freeRegister()

spillRegister

public void spillRegister()

clearSpill

public void clearSpill()

unpinRegister

public void unpinRegister()

isTouched

public boolean isTouched()

isAllocated

public boolean isAllocated()

isSpilled

public boolean isSpilled()

isPinned

public boolean isPinned()

isAvailable

public boolean isAvailable()

getRegisterAllocated

public Register getRegisterAllocated()

getSpillAllocated

public int getSpillAllocated()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getNext

public Register getNext()

setNext

void setNext(Register e)

getPrev

public Register getPrev()

linkWithNext

public void linkWithNext(Register Next)

append

void append(Register l)

remove

Register remove()