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:
Jakob Stoklund Olesen
2017-03-23 12:39:05 -07:00
parent c5c9f211df
commit f710f13949
7 changed files with 19 additions and 10 deletions

View File

@@ -160,7 +160,7 @@ fn type_suffix(func: &Function, inst: Inst) -> Option<Type> {
// Write out any value aliases appearing in `inst`.
fn write_value_aliases(w: &mut Write, func: &Function, inst: Inst, indent: usize) -> Result {
for &arg in func.dfg[inst].arguments(&func.dfg.value_lists) {
for &arg in func.dfg.inst_args(inst) {
let resolved = func.dfg.resolve_aliases(arg);
if resolved != arg {
writeln!(w, "{1:0$}{2} -> {3}", indent, "", arg, resolved)?;