Simplify the back-end of InstBuilder.
We don't want to distinguish between single-result and multiple-result instructions any longer. - Merge the simple_instruction() and complex_instruction() builder methods into a single build() that can handle all cases. - All format constructors now take a ctrl_type argument. Previously, some would take a result_type argument. - Instruction constructors no longer attempt to compute a single result type. Just pass a ctrl_type and let the backend decide. Fix one format constructor call in legalizer/split.rs which now takes a ctrl_type instead of a result type.
This commit is contained in:
@@ -228,7 +228,7 @@ fn split_value(dfg: &mut DataFlowGraph,
|
||||
// need to insert a split instruction before returning.
|
||||
pos.goto_top(ebb);
|
||||
pos.next_inst();
|
||||
let concat_inst = dfg.ins(pos).Binary(concat, ty, lo, hi).0;
|
||||
let concat_inst = dfg.ins(pos).Binary(concat, split_type, lo, hi).0;
|
||||
let concat_val = dfg.first_result(concat_inst);
|
||||
dfg.change_to_alias(value, concat_val);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user