Add dfg.inst_args(_mut) methods.
A shortcut for calling arguments() directly that goes with the existing inst_results() method.
This commit is contained in:
@@ -302,7 +302,7 @@ impl<'a> Context<'a> {
|
||||
}
|
||||
ConstraintKind::Tied(arg_index) => {
|
||||
// This def must use the same register as a fixed instruction argument.
|
||||
let arg = dfg[inst].arguments(&dfg.value_lists)[arg_index as usize];
|
||||
let arg = dfg.inst_args(inst)[arg_index as usize];
|
||||
let loc = locations[arg];
|
||||
*locations.ensure(lv.value) = loc;
|
||||
// Mark the reused register. It's not really clear if we support tied
|
||||
|
||||
@@ -320,7 +320,7 @@ impl Liveness {
|
||||
.unwrap_or(&[])
|
||||
.iter();
|
||||
|
||||
for &arg in func.dfg[inst].arguments(&func.dfg.value_lists) {
|
||||
for &arg in func.dfg.inst_args(inst) {
|
||||
// Get the live range, create it as a dead range if necessary.
|
||||
let lr = get_or_create(&mut self.ranges, arg, func, recipe_constraints);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user