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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user