Regalloc: remove the transient LiveRangeContext data structure;

This commit is contained in:
Benjamin Bouvier
2019-09-12 19:32:43 +02:00
parent b9b1c842e9
commit 5beb10e77a
10 changed files with 108 additions and 143 deletions

View File

@@ -334,10 +334,10 @@ impl<'a> LocationVerifier<'a> {
let lr = &liveness[value];
if is_after_branch && unique_predecessor {
// Forward diversions based on the targeted branch.
if !lr.is_livein(ebb, liveness.context(&self.func.layout)) {
if !lr.is_livein(ebb, liveness.forest(), &self.func.layout) {
val_to_remove.push(value)
}
} else if lr.is_livein(ebb, liveness.context(&self.func.layout)) {
} else if lr.is_livein(ebb, liveness.forest(), &self.func.layout) {
return fatal!(
errors,
inst,
@@ -359,7 +359,7 @@ impl<'a> LocationVerifier<'a> {
for (&value, d) in divert.iter() {
let lr = &liveness[value];
if let Some(ebb) = ebb {
if lr.is_livein(ebb, liveness.context(&self.func.layout)) {
if lr.is_livein(ebb, liveness.forest(), &self.func.layout) {
return fatal!(
errors,
inst,
@@ -371,7 +371,7 @@ impl<'a> LocationVerifier<'a> {
}
}
for ebb in self.func.jump_tables[jt].iter() {
if lr.is_livein(*ebb, liveness.context(&self.func.layout)) {
if lr.is_livein(*ebb, liveness.forest(), &self.func.layout) {
return fatal!(
errors,
inst,