update mir-opt tests

This commit is contained in:
Niko Matsakis 2018-06-29 10:04:17 -04:00
parent 865320f6a4
commit 73f8333e78
5 changed files with 8 additions and 6 deletions

View file

@ -280,7 +280,7 @@ fn dump_mir_results<'a, 'gcx, 'tcx>(
// that are live on exit from the basic block.
PassWhere::AfterTerminator(bb) => {
let s = live_variable_set(&liveness.regular.outs[bb], &liveness.drop.outs[bb]);
writeln!(out, " | Live variables on entry to {:?}: {}", bb, s)?;
writeln!(out, " | Live variables on exit from {:?}: {}", bb, s)?;
}
PassWhere::BeforeBlock(_) | PassWhere::AfterLocation(_) | PassWhere::AfterCFG => {}

View file

@ -26,20 +26,20 @@ fn main() {
//
// END RUST SOURCE
// START rustc.main.nll.0.mir
// | Live variables on entry to bb0: []
// bb0: {
// | Live variables on entry to bb0[0]: []
// StorageLive(_1);
// | Live variables on entry to bb0[1]: []
// _1 = const <std::boxed::Box<T>>::new(const 22usize) -> [return: bb2, unwind: bb1];
// | Live variables on exit from bb0: [_1 (drop)]
// }
// END rustc.main.nll.0.mir
// START rustc.main.nll.0.mir
// | Live variables on entry to bb2: [_1 (drop)]
// bb2: {
// | Live variables on entry to bb2[0]: [_1 (drop)]
// StorageLive(_2);
// | Live variables on entry to bb2[1]: [_1 (drop)]
// _2 = const can_panic() -> [return: bb3, unwind: bb4];
// | Live variables on exit from bb2: [_1 (drop), _2]
// }
// END rustc.main.nll.0.mir

View file

@ -25,7 +25,6 @@ fn main() {
// END RUST SOURCE
// START rustc.main.nll.0.mir
// | Live variables on entry to bb3: []
// bb3: {
// | Live variables on entry to bb3[0]: []
// _1 = const 55usize;
@ -37,5 +36,6 @@ fn main() {
// _4 = _1;
// | Live variables on entry to bb3[4]: [_4]
// _3 = const use_x(move _4) -> [return: bb4, unwind: bb1];
// | Live variables on exit from bb3: [_3]
// }
// END rustc.main.nll.0.mir

View file

@ -29,7 +29,6 @@ fn main() {
// END RUST SOURCE
// START rustc.main.nll.0.mir
// | Live variables on entry to bb3: [_1]
// bb3: {
// | Live variables on entry to bb3[0]: [_1]
// StorageLive(_4);
@ -37,12 +36,13 @@ fn main() {
// _4 = _1;
// | Live variables on entry to bb3[2]: [_4]
// _3 = const make_live(move _4) -> [return: bb5, unwind: bb1];
// | Live variables on exit from bb3: []
// }
// END rustc.main.nll.0.mir
// START rustc.main.nll.0.mir
// | Live variables on entry to bb4: []
// bb4: {
// | Live variables on entry to bb4[0]: []
// _5 = const make_dead() -> [return: bb6, unwind: bb1];
// | Live variables on exit from bb4: []
// }
// END rustc.main.nll.0.mir

View file

@ -42,6 +42,7 @@ fn main() {
// _2 = &'_#2r _1[_3];
// | Live variables on entry to bb2[1]: [_2]
// switchInt(const true) -> [false: bb4, otherwise: bb3];
// | Live variables on exit from bb2: [_2]
// }
// END rustc.main.nll.0.mir
// START rustc.main.nll.0.mir
@ -52,5 +53,6 @@ fn main() {
// _7 = (*_2);
// | Live variables on entry to bb3[2]: [_7]
// _6 = const use_x(move _7) -> [return: bb5, unwind: bb1];
// | Live variables on exit from bb3: []
// }
// END rustc.main.nll.0.mir