mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
68 lines
4.2 KiB
Diff
68 lines
4.2 KiB
Diff
- // MIR for `unique_with_copies` before ReferencePropagation
|
|
+ // MIR for `unique_with_copies` after ReferencePropagation
|
|
|
|
fn unique_with_copies() -> () {
|
|
let mut _0: (); // return place in scope 0 at $DIR/reference_prop.rs:+0:25: +0:25
|
|
let _1: *mut i32; // in scope 0 at $DIR/reference_prop.rs:+1:9: +1:10
|
|
let mut _2: i32; // in scope 0 at $DIR/reference_prop.rs:+2:13: +2:18
|
|
let _4: (); // in scope 0 at $DIR/reference_prop.rs:+5:18: +5:28
|
|
let mut _5: i32; // in scope 0 at $DIR/reference_prop.rs:+5:25: +5:27
|
|
let _6: (); // in scope 0 at $DIR/reference_prop.rs:+9:14: +9:24
|
|
let mut _7: i32; // in scope 0 at $DIR/reference_prop.rs:+9:21: +9:23
|
|
scope 1 {
|
|
- debug y => _1; // in scope 1 at $DIR/reference_prop.rs:+1:9: +1:10
|
|
+ debug y => _3; // in scope 1 at $DIR/reference_prop.rs:+1:9: +1:10
|
|
scope 5 {
|
|
}
|
|
}
|
|
scope 2 {
|
|
debug a => _2; // in scope 2 at $DIR/reference_prop.rs:+2:13: +2:18
|
|
let _3: *mut i32; // in scope 2 at $DIR/reference_prop.rs:+3:13: +3:14
|
|
scope 3 {
|
|
debug x => _3; // in scope 3 at $DIR/reference_prop.rs:+3:13: +3:14
|
|
scope 4 {
|
|
}
|
|
}
|
|
}
|
|
|
|
bb0: {
|
|
- StorageLive(_1); // scope 0 at $DIR/reference_prop.rs:+1:9: +1:10
|
|
StorageLive(_2); // scope 0 at $DIR/reference_prop.rs:+2:13: +2:18
|
|
_2 = const 0_i32; // scope 0 at $DIR/reference_prop.rs:+2:21: +2:22
|
|
- StorageLive(_3); // scope 2 at $DIR/reference_prop.rs:+3:13: +3:14
|
|
_3 = &raw mut _2; // scope 2 at $DIR/reference_prop.rs:+3:17: +3:27
|
|
StorageLive(_4); // scope 3 at $DIR/reference_prop.rs:+5:9: +5:30
|
|
StorageLive(_5); // scope 4 at $DIR/reference_prop.rs:+5:25: +5:27
|
|
_5 = (*_3); // scope 4 at $DIR/reference_prop.rs:+5:25: +5:27
|
|
_4 = opaque::<i32>(move _5) -> bb1; // scope 4 at $DIR/reference_prop.rs:+5:18: +5:28
|
|
// mir::Constant
|
|
// + span: $DIR/reference_prop.rs:524:18: 524:24
|
|
// + literal: Const { ty: fn(i32) {opaque::<i32>}, val: Value(<ZST>) }
|
|
}
|
|
|
|
bb1: {
|
|
StorageDead(_5); // scope 4 at $DIR/reference_prop.rs:+5:27: +5:28
|
|
StorageDead(_4); // scope 3 at $DIR/reference_prop.rs:+5:30: +5:31
|
|
- _1 = _3; // scope 3 at $DIR/reference_prop.rs:+6:9: +6:10
|
|
- StorageDead(_3); // scope 2 at $DIR/reference_prop.rs:+7:5: +7:6
|
|
StorageDead(_2); // scope 0 at $DIR/reference_prop.rs:+7:5: +7:6
|
|
StorageLive(_6); // scope 1 at $DIR/reference_prop.rs:+9:5: +9:26
|
|
StorageLive(_7); // scope 5 at $DIR/reference_prop.rs:+9:21: +9:23
|
|
- _7 = (*_1); // scope 5 at $DIR/reference_prop.rs:+9:21: +9:23
|
|
+ _7 = (*_3); // scope 5 at $DIR/reference_prop.rs:+9:21: +9:23
|
|
_6 = opaque::<i32>(move _7) -> bb2; // scope 5 at $DIR/reference_prop.rs:+9:14: +9:24
|
|
// mir::Constant
|
|
// + span: $DIR/reference_prop.rs:528:14: 528:20
|
|
// + literal: Const { ty: fn(i32) {opaque::<i32>}, val: Value(<ZST>) }
|
|
}
|
|
|
|
bb2: {
|
|
StorageDead(_7); // scope 5 at $DIR/reference_prop.rs:+9:23: +9:24
|
|
StorageDead(_6); // scope 1 at $DIR/reference_prop.rs:+9:26: +9:27
|
|
_0 = const (); // scope 0 at $DIR/reference_prop.rs:+0:25: +10:2
|
|
- StorageDead(_1); // scope 0 at $DIR/reference_prop.rs:+10:1: +10:2
|
|
return; // scope 0 at $DIR/reference_prop.rs:+10:2: +10:2
|
|
}
|
|
}
|
|
|