Remove the second_result field from instructions.

Now that result values are stored in value lists in the DFG, these
head-of-list pointers are no longer needed.
This commit is contained in:
Jakob Stoklund Olesen
2017-04-12 09:08:29 -07:00
parent 71338bb31f
commit 78a036fa51
5 changed files with 13 additions and 83 deletions

View File

@@ -118,13 +118,6 @@ impl<'f> InstBuilderBase<'f> for ReplaceBuilder<'f> {
// Construct new ones.
self.dfg.make_inst_results(self.inst, ctrl_typevar);
} else {
// Reattach the old secondary values.
let old_second_value = self.dfg.inst_results(self.inst).get(1).cloned();
if let Some(val_ref) = self.dfg[self.inst].second_result_mut() {
// Don't check types here. Leave that to the verifier.
*val_ref = old_second_value.into();
}
// Normally, make_inst_results() would also set the first result type, but we're not
// going to call that, so set it manually.
*self.dfg[self.inst].first_type_mut() = self.dfg