Package iota
Class NBasicBlock
java.lang.Object
iota.NBasicBlock
Representation of a basic block within a control-flow graph (cfg).
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe cfg that this block belongs to.List of high-level (HIR) instructions in this block.int
Unique identifier of this block.boolean
Is this block active?boolean
Is this block a loop head?boolean
Is this block a loop tail?boolean
Has this block been visited?List of low-level (LIR) instructions in this block.The local liveDef set (registers that are written to in this block).The global liveIn set (this.liveOut - this.liveDef + this.liveUse).The global liveOut set (union of s.liveIn for each successor s of this block).The local liveUse set (registers that are used before they are defined in this block).State vector of this block.List of Marvin (ie, target machine) instructions in this block.List of predecessors of this block.List of successors of this block.List of tuples in this block. -
Constructor Summary
ConstructorsConstructorDescriptionNBasicBlock
(NControlFlowGraph cfg, int id) Constructs an NBasicBlock object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
equals
(NBasicBlock other) Returns true if this block and other have the same id, and false otherwise.id()
Returns the id of this block as a string.toString()
Returns a string representation of this block.void
Writes the HIR instructions in this block to standard output.void
Writes the LIR instructions in this block to standard output.void
Writes the liveness sets in this block to standard output.void
Writes the tuples in this block to standard output.
-
Field Details
-
id
public int idUnique identifier of this block. -
cfg
The cfg that this block belongs to. -
tuples
List of tuples in this block. -
isVisited
public boolean isVisitedHas this block been visited? -
isActive
public boolean isActiveIs this block active? -
predecessors
List of predecessors of this block. -
successors
List of successors of this block. -
isLoopHead
public boolean isLoopHeadIs this block a loop head? -
isLoopTail
public boolean isLoopTailIs this block a loop tail? -
locals
State vector of this block. -
hir
List of high-level (HIR) instructions in this block. -
lir
List of low-level (LIR) instructions in this block. -
marvin
List of Marvin (ie, target machine) instructions in this block. -
liveUse
The local liveUse set (registers that are used before they are defined in this block). -
liveDef
The local liveDef set (registers that are written to in this block). -
liveIn
The global liveIn set (this.liveOut - this.liveDef + this.liveUse). -
liveOut
The global liveOut set (union of s.liveIn for each successor s of this block).
-
-
Constructor Details
-
NBasicBlock
Constructs an NBasicBlock object.- Parameters:
cfg
- the cfg containing the block.id
- id of the block.
-
-
Method Details
-
id
Returns the id of this block as a string.- Returns:
- the id of this block as a string.
-
equals
Returns true if this block and other have the same id, and false otherwise.- Parameters:
other
- the other block.- Returns:
- true if this block and other have the same id, and false otherwise.
-
toString
Returns a string representation of this block. -
writeTuplesToStdOut
Writes the tuples in this block to standard output.- Parameters:
p
- for pretty printing with indentation.
-
writeHirToStdOut
Writes the HIR instructions in this block to standard output.- Parameters:
p
- for pretty printing with indentation.
-
writeLirToStdOut
Writes the LIR instructions in this block to standard output.- Parameters:
p
- for pretty printing with indentation.
-
writeLivenessSetsToStdOut
Writes the liveness sets in this block to standard output.- Parameters:
p
- for pretty printing with indentation.
-