软件包 edu.ustc.cs.compile.arch.x86.regalloc

Provides a register allocator for x86 assembly language plus utilities to handle control flow graph in assembly level.

请参见:
          描述

类摘要
BasicBlock 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.
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.
RegAllocator This class implements a simple X86 register allocator.we use a greedy-like local algorithm to allocate registers.
 

软件包 edu.ustc.cs.compile.arch.x86.regalloc 的描述

Provides a register allocator for x86 assembly language plus utilities to handle control flow graph in assembly level. Class RegAllocator tries to maintain a symbol table, it also keep tracks of the use of X86 registers. It will help you handle register allocation. Other class in this package include the basic block definition and the basic block builder, it defines what a basic block looks like and provide methods to transform assembly code sequences into control flow graph. Such mechanism may help some who wants do more than the text book.