[WIP] Move MIR towards a single kind of local
This commit is contained in:
parent
205dac9355
commit
393db2d830
33 changed files with 628 additions and 661 deletions
|
|
@ -23,19 +23,19 @@ fn main() {}
|
|||
// END RUST SOURCE
|
||||
// START rustc.node13.Deaggregator.before.mir
|
||||
// bb0: {
|
||||
// var0 = arg0; // scope 0 at main.rs:8:8: 8:9
|
||||
// tmp0 = var0; // scope 1 at main.rs:9:14: 9:15
|
||||
// return = Baz { x: tmp0, y: const F32(0), z: const false }; // scope ...
|
||||
// local2 = local1; // scope 0 at main.rs:8:8: 8:9
|
||||
// local3 = local2; // scope 1 at main.rs:9:14: 9:15
|
||||
// local0 = Baz { x: local3, y: const F32(0), z: const false }; // scope ...
|
||||
// goto -> bb1; // scope 1 at main.rs:8:1: 10:2
|
||||
// }
|
||||
// END rustc.node13.Deaggregator.before.mir
|
||||
// START rustc.node13.Deaggregator.after.mir
|
||||
// bb0: {
|
||||
// var0 = arg0; // scope 0 at main.rs:8:8: 8:9
|
||||
// tmp0 = var0; // scope 1 at main.rs:9:14: 9:15
|
||||
// (return.0: usize) = tmp0; // scope 1 at main.rs:9:5: 9:34
|
||||
// (return.1: f32) = const F32(0); // scope 1 at main.rs:9:5: 9:34
|
||||
// (return.2: bool) = const false; // scope 1 at main.rs:9:5: 9:34
|
||||
// local2 = local1; // scope 0 at main.rs:8:8: 8:9
|
||||
// local3 = local2; // scope 1 at main.rs:9:14: 9:15
|
||||
// (local0.0: usize) = local3; // scope 1 at main.rs:9:5: 9:34
|
||||
// (local0.1: f32) = const F32(0); // scope 1 at main.rs:9:5: 9:34
|
||||
// (local0.2: bool) = const false; // scope 1 at main.rs:9:5: 9:34
|
||||
// goto -> bb1; // scope 1 at main.rs:8:1: 10:2
|
||||
// }
|
||||
// END rustc.node13.Deaggregator.after.mir
|
||||
// END rustc.node13.Deaggregator.after.mir
|
||||
|
|
|
|||
|
|
@ -28,18 +28,18 @@ fn main() {
|
|||
// END RUST SOURCE
|
||||
// START rustc.node10.Deaggregator.before.mir
|
||||
// bb0: {
|
||||
// var0 = arg0; // scope 0 at main.rs:7:8: 7:9
|
||||
// tmp0 = var0; // scope 1 at main.rs:8:19: 8:20
|
||||
// return = Baz::Foo { x: tmp0 }; // scope 1 at main.rs:8:5: 8:21
|
||||
// local2 = local1; // scope 0 at main.rs:7:8: 7:9
|
||||
// local3 = local2; // scope 1 at main.rs:8:19: 8:20
|
||||
// local0 = Baz::Foo { x: local3 }; // scope 1 at main.rs:8:5: 8:21
|
||||
// goto -> bb1; // scope 1 at main.rs:7:1: 9:2
|
||||
// }
|
||||
// END rustc.node10.Deaggregator.before.mir
|
||||
// START rustc.node10.Deaggregator.after.mir
|
||||
// bb0: {
|
||||
// var0 = arg0; // scope 0 at main.rs:7:8: 7:9
|
||||
// tmp0 = var0; // scope 1 at main.rs:8:19: 8:20
|
||||
// ((return as Foo).0: usize) = tmp0; // scope 1 at main.rs:8:5: 8:21
|
||||
// discriminant(return) = 1; // scope 1 at main.rs:8:5: 8:21
|
||||
// local2 = local1; // scope 0 at main.rs:7:8: 7:9
|
||||
// local3 = local2; // scope 1 at main.rs:8:19: 8:20
|
||||
// ((local0 as Foo).0: usize) = local3; // scope 1 at main.rs:8:5: 8:21
|
||||
// discriminant(local0) = 1; // scope 1 at main.rs:8:5: 8:21
|
||||
// goto -> bb1; // scope 1 at main.rs:7:1: 9:2
|
||||
// }
|
||||
// END rustc.node10.Deaggregator.after.mir
|
||||
// END rustc.node10.Deaggregator.after.mir
|
||||
|
|
|
|||
|
|
@ -18,27 +18,28 @@ fn main() {
|
|||
let c = 1;
|
||||
}
|
||||
|
||||
// TODO The StorageDead for local1 (a) after local6's (c) is missing!
|
||||
|
||||
// END RUST SOURCE
|
||||
// START rustc.node4.TypeckMir.before.mir
|
||||
// bb0: {
|
||||
// StorageLive(var0); // scope 0 at storage_ranges.rs:14:9: 14:10
|
||||
// var0 = const 0i32; // scope 0 at storage_ranges.rs:14:13: 14:14
|
||||
// StorageLive(var1); // scope 1 at storage_ranges.rs:16:13: 16:14
|
||||
// StorageLive(tmp1); // scope 1 at storage_ranges.rs:16:18: 16:25
|
||||
// StorageLive(tmp2); // scope 1 at storage_ranges.rs:16:23: 16:24
|
||||
// tmp2 = var0; // scope 1 at storage_ranges.rs:16:23: 16:24
|
||||
// tmp1 = std::option::Option<i32>::Some(tmp2,); // scope 1 at storage_ranges.rs:16:18: 16:25
|
||||
// var1 = &tmp1; // scope 1 at storage_ranges.rs:16:17: 16:25
|
||||
// StorageDead(tmp2); // scope 1 at storage_ranges.rs:16:23: 16:24
|
||||
// tmp0 = (); // scope 2 at storage_ranges.rs:15:5: 17:6
|
||||
// StorageDead(tmp1); // scope 1 at storage_ranges.rs:16:18: 16:25
|
||||
// StorageDead(var1); // scope 1 at storage_ranges.rs:16:13: 16:14
|
||||
// StorageLive(var2); // scope 1 at storage_ranges.rs:18:9: 18:10
|
||||
// var2 = const 1i32; // scope 1 at storage_ranges.rs:18:13: 18:14
|
||||
// return = (); // scope 3 at storage_ranges.rs:13:11: 19:2
|
||||
// StorageDead(var2); // scope 1 at storage_ranges.rs:18:9: 18:10
|
||||
// StorageDead(var0); // scope 0 at storage_ranges.rs:14:9: 14:10
|
||||
// goto -> bb1; // scope 0 at storage_ranges.rs:13:1: 19:2
|
||||
// StorageLive(local1); // scope 0 at storage_ranges.rs:12:9: 12:10
|
||||
// local1 = const 0i32; // scope 0 at storage_ranges.rs:12:13: 12:14
|
||||
// StorageLive(local3); // scope 1 at storage_ranges.rs:14:13: 14:14
|
||||
// StorageLive(local4); // scope 1 at storage_ranges.rs:14:18: 14:25
|
||||
// StorageLive(local5); // scope 1 at storage_ranges.rs:14:23: 14:24
|
||||
// local5 = local1; // scope 1 at storage_ranges.rs:14:23: 14:24
|
||||
// local4 = std::option::Option<i32>::Some(local5,); // scope 1 at storage_ranges.rs:14:18: 14:25
|
||||
// local3 = &local4; // scope 1 at storage_ranges.rs:14:17: 14:25
|
||||
// StorageDead(local5); // scope 1 at storage_ranges.rs:14:23: 14:24
|
||||
// local2 = (); // scope 2 at storage_ranges.rs:13:5: 15:6
|
||||
// StorageDead(local4); // scope 1 at storage_ranges.rs:14:18: 14:25
|
||||
// StorageDead(local3); // scope 1 at storage_ranges.rs:14:13: 14:14
|
||||
// StorageLive(local6); // scope 1 at storage_ranges.rs:16:9: 16:10
|
||||
// local6 = const 1i32; // scope 1 at storage_ranges.rs:16:13: 16:14
|
||||
// local0 = (); // scope 3 at storage_ranges.rs:11:11: 17:2
|
||||
// StorageDead(local6); // scope 1 at storage_ranges.rs:16:9: 16:10
|
||||
// goto -> bb1; // scope 0 at storage_ranges.rs:11:1: 17:2
|
||||
// }
|
||||
//
|
||||
// bb1: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue