about summary refs log tree commit diff
path: root/src/test/mir-opt/inline/inline_cycle.two.Inline.diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-07-02 11:24:17 +0000
committerbors <bors@rust-lang.org>2022-07-02 11:24:17 +0000
commit0075bb4fad68e64b6d1be06bf2db366c30bc75e1 (patch)
treea5160fdc5cce917dc6bae3cb99277dab7b37e279 /src/test/mir-opt/inline/inline_cycle.two.Inline.diff
parentaedf78e56b2279cc869962feac5153b6ba7001ed (diff)
parentcbbf06b0cd39dc93033568f1e65f5363cbbdebcd (diff)
downloadrust-0075bb4fad68e64b6d1be06bf2db366c30bc75e1.tar.gz
rust-0075bb4fad68e64b6d1be06bf2db366c30bc75e1.zip
Auto merge of #91743 - cjgillot:enable_mir_inlining_inline_all, r=oli-obk
Enable MIR inlining

Continuation of https://github.com/rust-lang/rust/pull/82280 by `@wesleywiser.`

#82280 has shown nice compile time wins could be obtained by enabling MIR inlining.
Most of the issues in https://github.com/rust-lang/rust/issues/81567 are now fixed,
except the interaction with polymorphization which is worked around specifically.

I believe we can proceed with enabling MIR inlining in the near future
(preferably just after beta branching, in case we discover new issues).

Steps before merging:
- [x] figure out the interaction with polymorphization;
- [x] figure out how miri should deal with extern types;
- [x] silence the extra arithmetic overflow warnings;
- [x] remove the codegen fulfilment ICE;
- [x] remove the type normalization ICEs while compiling nalgebra;
- [ ] tweak the inlining threshold.
Diffstat (limited to 'src/test/mir-opt/inline/inline_cycle.two.Inline.diff')
-rw-r--r--src/test/mir-opt/inline/inline_cycle.two.Inline.diff20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/test/mir-opt/inline/inline_cycle.two.Inline.diff b/src/test/mir-opt/inline/inline_cycle.two.Inline.diff
index eac5bf8edec..c7f8a64afcd 100644
--- a/src/test/mir-opt/inline/inline_cycle.two.Inline.diff
+++ b/src/test/mir-opt/inline/inline_cycle.two.Inline.diff
@@ -11,6 +11,9 @@
 +         let _3: ();                      // in scope 1 at $DIR/inline-cycle.rs:54:5: 54:8
 +         let mut _4: fn() {f};            // in scope 1 at $DIR/inline-cycle.rs:54:5: 54:6
 +         scope 2 (inlined <fn() {f} as FnOnce<()>>::call_once - shim(fn() {f})) { // at $DIR/inline-cycle.rs:54:5: 54:8
++             scope 3 (inlined f) {        // at $SRC_DIR/core/src/ops/function.rs:LL:COL
++                 let _6: ();              // in scope 3 at $DIR/inline-cycle.rs:59:5: 59:12
++             }
 +         }
 +     }
   
@@ -21,19 +24,26 @@
 +         _2 = f;                          // scope 0 at $DIR/inline-cycle.rs:49:5: 49:12
                                            // mir::Constant
 -                                          // + span: $DIR/inline-cycle.rs:49:5: 49:9
--                                          // + literal: Const { ty: fn(fn() {f}) {call::<fn() {f}>}, val: Value(Scalar(<ZST>)) }
--                                          // mir::Constant
-                                           // + span: $DIR/inline-cycle.rs:49:10: 49:11
-                                           // + literal: Const { ty: fn() {f}, val: Value(Scalar(<ZST>)) }
++                                          // + span: $DIR/inline-cycle.rs:49:10: 49:11
++                                          // + literal: Const { ty: fn() {f}, val: Value(Scalar(<ZST>)) }
 +         StorageLive(_3);                 // scope 1 at $DIR/inline-cycle.rs:54:5: 54:8
 +         StorageLive(_4);                 // scope 1 at $DIR/inline-cycle.rs:54:5: 54:6
 +         _4 = move _2;                    // scope 1 at $DIR/inline-cycle.rs:54:5: 54:6
 +         StorageLive(_5);                 // scope 1 at $DIR/inline-cycle.rs:54:5: 54:8
 +         _5 = const ();                   // scope 1 at $DIR/inline-cycle.rs:54:5: 54:8
-+         _3 = move _4() -> bb1;           // scope 2 at $SRC_DIR/core/src/ops/function.rs:LL:COL
++         StorageLive(_6);                 // scope 3 at $DIR/inline-cycle.rs:59:5: 59:12
++         _6 = call::<fn() {f}>(f) -> bb1; // scope 3 at $DIR/inline-cycle.rs:59:5: 59:12
++                                          // mir::Constant
++                                          // + span: $DIR/inline-cycle.rs:59:5: 59:9
+                                           // + literal: Const { ty: fn(fn() {f}) {call::<fn() {f}>}, val: Value(Scalar(<ZST>)) }
+                                           // mir::Constant
+-                                          // + span: $DIR/inline-cycle.rs:49:10: 49:11
++                                          // + span: $DIR/inline-cycle.rs:59:10: 59:11
+                                           // + literal: Const { ty: fn() {f}, val: Value(Scalar(<ZST>)) }
       }
   
       bb1: {
++         StorageDead(_6);                 // scope 3 at $DIR/inline-cycle.rs:59:12: 59:13
 +         StorageDead(_5);                 // scope 1 at $DIR/inline-cycle.rs:54:5: 54:8
 +         StorageDead(_4);                 // scope 1 at $DIR/inline-cycle.rs:54:7: 54:8
 +         StorageDead(_3);                 // scope 1 at $DIR/inline-cycle.rs:54:8: 54:9