edu.ustc.cs.compile.arch.x86.regalloc
类 BasicBlock

java.lang.Object
  继承者 edu.ustc.cs.compile.arch.x86.regalloc.BasicBlock

public class BasicBlock
extends java.lang.Object

A basic block is an ordered list of statements which meets the following conditions simutaneously: 1. the first statement in a basic block is a label. 2. the last statement in a basic block is an unconditional or conditional jump instruction. 3. no other label, conditional or unconditional jump instructions.


字段摘要
private  int id
           
private static int idSeed
           
private  boolean isCondGoto
           
(专用软件包)  Label label
           
private  java.util.List<BasicBlock> nextBlocks
           
private  int number
           
private  java.util.List<BasicBlock> preBlocks
           
private  AssemblySequence stmts
           
(专用软件包)  java.lang.Object stuff
           
 
构造函数摘要
BasicBlock()
          Constructor
 
方法摘要
 int getID()
          Returns the basic block's ID number.
 Label getLabel()
          Returns the label of the basic block.
 java.util.List<BasicBlock> getNextBlocks()
          Returns the successing basic blocks.
 int getNumber()
          Returns the number of this basic block.
 java.util.List<BasicBlock> getPreBlocks()
          Returns the predecessing basic blocks.
 AssemblySequence getStmts()
          Returns the basic block's body statements.
 boolean isCondGoto()
          Returns true if this BB has a conditional jump instruction.
 void setCondGoto(boolean flag)
          Sets a mark indicating that this BB has a conditional jump instruction.
 void setLabel(Label label_)
          Sets the basic block's label.
 void setNumber(int number)
          Sets the number of this basic block.
 java.lang.String toString()
          (For debugging use only)Returns string representation of the basic block.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

preBlocks

private java.util.List<BasicBlock> preBlocks

nextBlocks

private java.util.List<BasicBlock> nextBlocks

stmts

private AssemblySequence stmts

label

Label label

stuff

java.lang.Object stuff

id

private int id

idSeed

private static int idSeed

number

private int number

isCondGoto

private boolean isCondGoto
构造函数详细信息

BasicBlock

public BasicBlock()
Constructor

方法详细信息

getLabel

public Label getLabel()
Returns the label of the basic block.

返回:
label of the basic block

setLabel

public void setLabel(Label label_)
Sets the basic block's label.

参数:
label_ - new label that will replace the BB's old one.

getPreBlocks

public java.util.List<BasicBlock> getPreBlocks()
Returns the predecessing basic blocks.


getNextBlocks

public java.util.List<BasicBlock> getNextBlocks()
Returns the successing basic blocks.


getStmts

public AssemblySequence getStmts()
Returns the basic block's body statements.


getID

public int getID()
Returns the basic block's ID number.


toString

public java.lang.String toString()
(For debugging use only)Returns string representation of the basic block.

覆盖:
java.lang.Object 中的 toString

isCondGoto

public boolean isCondGoto()
Returns true if this BB has a conditional jump instruction.


setCondGoto

public void setCondGoto(boolean flag)
Sets a mark indicating that this BB has a conditional jump instruction.


getNumber

public int getNumber()
Returns the number of this basic block.


setNumber

public void setNumber(int number)
Sets the number of this basic block.