Skip to content

Commit d62b6f2

Browse files
committed
Pull out a special case in merge_from_succ.
This is a small perf win.
1 parent 0eb297d commit d62b6f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/librustc_passes/liveness.rs

+6
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,12 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
824824

825825
let mut any_changed = false;
826826
self.indices2(ln, succ_ln, |this, idx, succ_idx| {
827+
// This is a special case, pulled out from the code below, where we
828+
// don't have to do anything. It occurs about 60-70% of the time.
829+
if this.rwu_table.packed_rwus[succ_idx] == INV_INV_FALSE {
830+
return;
831+
}
832+
827833
let mut changed = false;
828834
let mut rwu = this.rwu_table.get(idx);
829835
let succ_rwu = this.rwu_table.get(succ_idx);

0 commit comments

Comments
 (0)