2022-08-25 11:43:46 -05:00
|
|
|
- // MIR for `main` before DataflowConstProp
|
|
|
|
+ // MIR for `main` after DataflowConstProp
|
|
|
|
|
|
|
|
fn main() -> () {
|
2023-06-06 08:47:00 -05:00
|
|
|
let mut _0: ();
|
|
|
|
let _1: i32;
|
|
|
|
let _2: ();
|
|
|
|
let mut _3: i32;
|
|
|
|
let mut _4: i32;
|
2022-08-25 11:43:46 -05:00
|
|
|
scope 1 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug a => _1;
|
2022-08-25 11:43:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_1);
|
|
|
|
_1 = const 1_i32;
|
|
|
|
StorageLive(_2);
|
|
|
|
StorageLive(_3);
|
|
|
|
StorageLive(_4);
|
|
|
|
- _4 = copy _1;
|
|
|
|
- _3 = Add(move _4, const 1_i32);
|
|
|
|
+ _4 = const 1_i32;
|
|
|
|
+ _3 = const 2_i32;
|
|
|
|
StorageDead(_4);
|
2023-06-23 11:53:09 -05:00
|
|
|
- _2 = foo(move _3) -> [return: bb1, unwind continue];
|
|
|
|
+ _2 = foo(const 2_i32) -> [return: bb1, unwind continue];
|
2022-08-25 11:43:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_3);
|
|
|
|
StorageDead(_2);
|
|
|
|
_0 = const ();
|
|
|
|
StorageDead(_1);
|
|
|
|
return;
|
2022-08-25 11:43:46 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|