diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2020-11-09 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2020-11-09 00:00:00 +0000 |
| commit | ffa70d75c8f5925ea26697c7ca5d20fd4d85cbb2 (patch) | |
| tree | 651d860cbf1c68a5497a6706f30ebc0f31a398b3 /src/test/mir-opt/inline/inline_diverging.f.Inline.diff | |
| parent | dc4d74d149198c60ca1cf3a8513a7f3d031503eb (diff) | |
| download | rust-ffa70d75c8f5925ea26697c7ca5d20fd4d85cbb2.tar.gz rust-ffa70d75c8f5925ea26697c7ca5d20fd4d85cbb2.zip | |
Support inlining diverging function calls
Additionally introduce storage markers for all temporaries created by the inliner. The temporary introduced for destination rebrorrow, didn't use them previously.
Diffstat (limited to 'src/test/mir-opt/inline/inline_diverging.f.Inline.diff')
| -rw-r--r-- | src/test/mir-opt/inline/inline_diverging.f.Inline.diff | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/mir-opt/inline/inline_diverging.f.Inline.diff b/src/test/mir-opt/inline/inline_diverging.f.Inline.diff new file mode 100644 index 00000000000..6e36dc06a20 --- /dev/null +++ b/src/test/mir-opt/inline/inline_diverging.f.Inline.diff @@ -0,0 +1,26 @@ +- // MIR for `f` before Inline ++ // MIR for `f` after Inline + + fn f() -> () { + let mut _0: (); // return place in scope 0 at $DIR/inline-diverging.rs:7:12: 7:12 + let mut _1: !; // in scope 0 at $DIR/inline-diverging.rs:7:12: 9:2 + let _2: !; // in scope 0 at $DIR/inline-diverging.rs:8:5: 8:12 ++ let mut _3: !; // in scope 0 at $DIR/inline-diverging.rs:8:5: 8:12 ++ scope 1 (inlined sleep) { // at $DIR/inline-diverging.rs:8:5: 8:12 ++ } + + bb0: { + StorageLive(_2); // scope 0 at $DIR/inline-diverging.rs:8:5: 8:12 +- sleep(); // scope 0 at $DIR/inline-diverging.rs:8:5: 8:12 +- // mir::Constant +- // + span: $DIR/inline-diverging.rs:8:5: 8:10 +- // + literal: Const { ty: fn() -> ! {sleep}, val: Value(Scalar(<ZST>)) } ++ StorageLive(_3); // scope 0 at $DIR/inline-diverging.rs:8:5: 8:12 ++ goto -> bb1; // scope 0 at $DIR/inline-diverging.rs:8:5: 8:12 ++ } ++ ++ bb1: { ++ goto -> bb1; // scope 1 at $DIR/inline-diverging.rs:8:5: 8:12 + } + } + |
