Simplify branch arguments after splitting EBB arguments.
The EBB argument splitting may generate concat-split dependencies when it repairs branch arguments in EBBs that have not yet been fully legalized. Add a branch argument simplification step that can resolve these dependency chains. This means that all split and concatenation instructions will be dead after legalization for types that have no legal instructions using them.
This commit is contained in:
@@ -54,6 +54,10 @@ pub fn legalize_function(func: &mut Function, cfg: &mut ControlFlowGraph, isa: &
|
||||
continue;
|
||||
}
|
||||
|
||||
if opcode.is_branch() {
|
||||
split::simplify_branch_arguments(&mut func.dfg, inst);
|
||||
}
|
||||
|
||||
match isa.encode(&func.dfg, &func.dfg[inst]) {
|
||||
Ok(encoding) => *func.encodings.ensure(inst) = encoding,
|
||||
Err(action) => {
|
||||
|
||||
Reference in New Issue
Block a user