Move the ctrl_typevar function into dfg.
Soon, InstructionData won't have sufficient information to compute this. Give TargetIsa::encode() an explicit ctrl_typevar argument. This function does not require the instruction to be inserted in the DFG tables.
This commit is contained in:
@@ -64,7 +64,7 @@ pub fn legalize_function(func: &mut Function, cfg: &mut ControlFlowGraph, isa: &
|
||||
split::simplify_branch_arguments(&mut func.dfg, inst);
|
||||
}
|
||||
|
||||
match isa.encode(&func.dfg, &func.dfg[inst]) {
|
||||
match isa.encode(&func.dfg, &func.dfg[inst], func.dfg.ctrl_typevar(inst)) {
|
||||
Ok(encoding) => *func.encodings.ensure(inst) = encoding,
|
||||
Err(action) => {
|
||||
// We should transform the instruction into legal equivalents.
|
||||
|
||||
Reference in New Issue
Block a user