Use a sorted array for (Ebb, Inst) interval again (fixes #1084);
This commit is contained in:
@@ -118,12 +118,7 @@ impl<'a> CssaVerifier<'a> {
|
||||
if self.preorder.dominates(prev_ebb, def_ebb)
|
||||
&& self.domtree.dominates(prev_def, def, &self.func.layout)
|
||||
{
|
||||
if self.liveness[prev_val].overlaps_def(
|
||||
def,
|
||||
def_ebb,
|
||||
self.liveness.forest(),
|
||||
&self.func.layout,
|
||||
) {
|
||||
if self.liveness[prev_val].overlaps_def(def, def_ebb, &self.func.layout) {
|
||||
return fatal!(
|
||||
errors,
|
||||
val,
|
||||
|
||||
@@ -107,7 +107,7 @@ impl<'a> LivenessVerifier<'a> {
|
||||
};
|
||||
|
||||
debug_assert!(self.func.layout.inst_ebb(inst).unwrap() == ebb);
|
||||
if !lr.reaches_use(inst, ebb, self.liveness.forest(), &self.func.layout) {
|
||||
if !lr.reaches_use(inst, ebb, &self.func.layout) {
|
||||
return fatal!(errors, inst, "{} is not live at this use", val);
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ impl<'a> LivenessVerifier<'a> {
|
||||
}
|
||||
|
||||
// Now check the live-in intervals against the CFG.
|
||||
for (mut ebb, end) in lr.liveins(self.liveness.forest()) {
|
||||
for (mut ebb, end) in lr.liveins() {
|
||||
if !l.is_ebb_inserted(ebb) {
|
||||
return fatal!(
|
||||
errors,
|
||||
@@ -207,7 +207,7 @@ impl<'a> LivenessVerifier<'a> {
|
||||
loop {
|
||||
// If `val` is live-in at `ebb`, it must be live at all the predecessors.
|
||||
for BasicBlock { inst: pred, ebb } in self.cfg.pred_iter(ebb) {
|
||||
if !lr.reaches_use(pred, ebb, self.liveness.forest(), &self.func.layout) {
|
||||
if !lr.reaches_use(pred, ebb, &self.func.layout) {
|
||||
return fatal!(
|
||||
errors,
|
||||
pred,
|
||||
|
||||
@@ -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.forest(), &self.func.layout) {
|
||||
if !lr.is_livein(ebb, &self.func.layout) {
|
||||
val_to_remove.push(value)
|
||||
}
|
||||
} else if lr.is_livein(ebb, liveness.forest(), &self.func.layout) {
|
||||
} else if lr.is_livein(ebb, &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.forest(), &self.func.layout) {
|
||||
if lr.is_livein(ebb, &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.forest(), &self.func.layout) {
|
||||
if lr.is_livein(*ebb, &self.func.layout) {
|
||||
return fatal!(
|
||||
errors,
|
||||
inst,
|
||||
|
||||
Reference in New Issue
Block a user