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:
@@ -110,7 +110,9 @@ impl SubTest for TestBinEmit {
|
||||
.get(inst)
|
||||
.map(|e| e.is_legal())
|
||||
.unwrap_or(false) {
|
||||
if let Ok(enc) = isa.encode(&func.dfg, &func.dfg[inst]) {
|
||||
if let Ok(enc) = isa.encode(&func.dfg,
|
||||
&func.dfg[inst],
|
||||
func.dfg.ctrl_typevar(inst)) {
|
||||
*func.encodings.ensure(inst) = enc;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user