org.jikesrvm.compilers.opt.regalloc
Class LiveIntervalElement

java.lang.Object
  extended by org.jikesrvm.compilers.opt.regalloc.LiveIntervalElement

public final class LiveIntervalElement
extends Object

This class defines a LiveInterval node created by Live Variable analysis and used in Linear Scan.

See Also:
LinearScan

Field Summary
private  BasicBlock bb
          The basic block holding this live interval element
private  Instruction begin
          instruction where the live interval begins (null if alive at basic block entry)
private  Instruction end
          instruction where the live interval ends (null if alive at basic block exit)
(package private)  LiveIntervalElement next
          LiveIntervalElements are linked in a singly-linked list; this is the next pointer.
private  Register register
          register that this live interval is for
 
Constructor Summary
LiveIntervalElement(Register reg)
          Use this constructor when the live interval spans a basic block boundary.
LiveIntervalElement(Register reg, Instruction begin, Instruction end)
          Use this constructur when the live interval is within a basic block
 
Method Summary
 BasicBlock getBasicBlock()
           
 Instruction getBegin()
           
 Instruction getEnd()
           
 LiveIntervalElement getNext()
           
 Register getRegister()
           
 int hashCode()
           
 void setBasicBlock(BasicBlock bb)
           
 void setBegin(Instruction begin)
           
 void setNext(LiveIntervalElement Next)
           
 void setRegister(Register r)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

register

private Register register
register that this live interval is for


begin

private Instruction begin
instruction where the live interval begins (null if alive at basic block entry)


end

private Instruction end
instruction where the live interval ends (null if alive at basic block exit)


bb

private BasicBlock bb
The basic block holding this live interval element


next

LiveIntervalElement next
LiveIntervalElements are linked in a singly-linked list; this is the next pointer.

Constructor Detail

LiveIntervalElement

public LiveIntervalElement(Register reg)
Use this constructor when the live interval spans a basic block boundary.

Parameters:
reg - The Register whose live interval we are representing

LiveIntervalElement

public LiveIntervalElement(Register reg,
                           Instruction begin,
                           Instruction end)
Use this constructur when the live interval is within a basic block

Parameters:
reg - the Register whose live interval we are representing
begin - the definition of the register
end - the last use of the register
Method Detail

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getBegin

public Instruction getBegin()

setBegin

public void setBegin(Instruction begin)

getEnd

public Instruction getEnd()

getRegister

public Register getRegister()

setRegister

public void setRegister(Register r)

getNext

public LiveIntervalElement getNext()

setNext

public void setNext(LiveIntervalElement Next)

getBasicBlock

public BasicBlock getBasicBlock()

setBasicBlock

public void setBasicBlock(BasicBlock bb)