Use a sorted array for (Ebb, Inst) interval again (fixes #1084);

This commit is contained in:
Benjamin Bouvier
2019-09-13 18:58:50 +02:00
parent 79784dfaf6
commit 4e3cb25983
10 changed files with 212 additions and 250 deletions

View File

@@ -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,