|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造函数 | 方法 | 详细信息: 字段 | 构造函数 | 方法 |
java.lang.Objectedu.ustc.cs.compile.arch.x86.regalloc.BasicBlockBuilder
public class BasicBlockBuilder
The algorithm to construct basic blocks for an procedure is quite simple: We scan the statement list from head to tail, if we discover a Label, then start a new basic block. if we disocver a conditional or unconditional jump instruction, we close a basic block. If a basic block's end is not a conditional or unconditional jump, we add one jump instruction (jump to next basic block's label) to the end of the basic block. We record all the preceeding and successing basic blocks for every BB. The initial basic block has no preceeding BBs. The algorithm is detailed in the Tiger book by Andrew W.Appel.
构造函数摘要 | |
---|---|
BasicBlockBuilder()
|
方法摘要 | |
---|---|
static java.util.List<BasicBlock> |
compressBB(java.util.List<BasicBlock> bbs)
removes those BBs which are empty and unnecessary jump instructions and labels. |
static java.util.List<BasicBlock> |
getBasicBlocks(AssemblySequence stmts)
returns basic blocks of the input statements. |
static void |
main(java.lang.String[] args)
main test function. |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造函数详细信息 |
---|
public BasicBlockBuilder()
方法详细信息 |
---|
public static java.util.List<BasicBlock> getBasicBlocks(AssemblySequence stmts) throws java.lang.Exception
stmts
- the assembly statements that we are going to
get the basic blocks out of. stmts should be an intermediate representation of
a sub-procedure in text segment, which means we do not process pseudo-directives.
java.lang.Exception
public static void main(java.lang.String[] args)
public static java.util.List<BasicBlock> compressBB(java.util.List<BasicBlock> bbs)
|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造函数 | 方法 | 详细信息: 字段 | 构造函数 | 方法 |