Add an Index<Value> implementation to Liveness.

Use it to access live ranges that are supposed to be there.
This commit is contained in:
Jakob Stoklund Olesen
2017-06-29 15:13:04 -07:00
parent 3fbcdb4ea6
commit 51dcabd87c
4 changed files with 17 additions and 12 deletions

View File

@@ -285,8 +285,7 @@ impl<'a> Context<'a> {
for (op, &arg) in constraints.ins.iter().zip(args) {
if op.kind != ConstraintKind::Stack {
let lv = self.liveness.get(arg).expect("Missing live range for arg");
if lv.affinity.is_stack() {
if self.liveness[arg].affinity.is_stack() {
self.candidates
.push(ReloadCandidate {
value: arg,