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:
@@ -152,7 +152,7 @@ fn type_suffix(func: &Function, inst: Inst) -> Option<Type> {
|
||||
}
|
||||
}
|
||||
|
||||
let rtype = inst_data.ctrl_typevar(&func.dfg);
|
||||
let rtype = func.dfg.ctrl_typevar(inst);
|
||||
assert!(!rtype.is_void(),
|
||||
"Polymorphic instruction must produce a result");
|
||||
Some(rtype)
|
||||
|
||||
Reference in New Issue
Block a user