Change dfg.inst_results to return a slice.

Now we can access instruction results and arguments as well as EBB
arguments as slices.

Delete the Values iterator which was traversing the linked lists of
values. It is no longer needed.
This commit is contained in:
Jakob Stoklund Olesen
2017-04-11 16:53:54 -07:00
parent 3a36435c3b
commit 322a8db839
9 changed files with 33 additions and 81 deletions

View File

@@ -1257,12 +1257,13 @@ impl<'a> Parser<'a> {
// holds a reference to `ctx.function`.
self.add_values(&mut ctx.map,
results.into_iter(),
ctx.function.dfg.inst_results(inst))?;
ctx.function.dfg.inst_results(inst).iter().cloned())?;
if let Some(result_locations) = result_locations {
for (value, loc) in ctx.function
for (&value, loc) in ctx.function
.dfg
.inst_results(inst)
.iter()
.zip(result_locations) {
*ctx.function.locations.ensure(value) = loc;
}