Always call reassign_in for register ABI arguments.

Even if an argument is already in the correct register, make sure that
we detect conflicts by registering the no-op move. This also means that
the ABI argument register won't be turned into a variable for the
solver.
This commit is contained in:
Jakob Stoklund Olesen
2017-06-14 12:05:47 -07:00
parent 897c363714
commit 96f1228211
2 changed files with 19 additions and 19 deletions

View File

@@ -364,13 +364,15 @@ impl Solver {
}
self.regs_in.free(rc, from);
self.regs_out.take(rc, to);
self.assignments
.insert(Assignment {
value,
rc,
from,
to,
});
if from != to {
self.assignments
.insert(Assignment {
value,
rc,
from,
to,
});
}
}
/// Add a variable representing an input side value with an existing register assignment.