Use DataFlowGraph in Function.

Replace the three tables instructions, extended_basic_blocks, and
extended_values with a single 'dfg' public member.

Clients using Function are changed to refer to func.layout and func.dfg
respectively.
This commit is contained in:
Jakob Stoklund Olesen
2016-07-19 13:05:28 -07:00
parent 8a55ed59de
commit 28804e0b41
6 changed files with 38 additions and 468 deletions

View File

@@ -6,7 +6,7 @@ use instructions::{InstructionData, Opcode, VariableArgs, JumpData, BranchData};
use types;
pub fn jump(func: &mut Function, dest: Ebb) -> Inst {
func.make_inst(InstructionData::Jump {
func.dfg.make_inst(InstructionData::Jump {
opcode: Opcode::Jump,
ty: types::VOID,
data: Box::new(JumpData {
@@ -17,7 +17,7 @@ pub fn jump(func: &mut Function, dest: Ebb) -> Inst {
}
pub fn branch(func: &mut Function, dest: Ebb) -> Inst {
func.make_inst(InstructionData::Branch {
func.dfg.make_inst(InstructionData::Branch {
opcode: Opcode::Brz,
ty: types::VOID,
data: Box::new(BranchData {