diff options
| author | bors <bors@rust-lang.org> | 2022-07-02 11:24:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-07-02 11:24:17 +0000 |
| commit | 0075bb4fad68e64b6d1be06bf2db366c30bc75e1 (patch) | |
| tree | a5160fdc5cce917dc6bae3cb99277dab7b37e279 /compiler/rustc_monomorphize/src | |
| parent | aedf78e56b2279cc869962feac5153b6ba7001ed (diff) | |
| parent | cbbf06b0cd39dc93033568f1e65f5363cbbdebcd (diff) | |
| download | rust-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 'compiler/rustc_monomorphize/src')
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 3f082896ccf..b9936e35b77 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -730,7 +730,8 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirNeighborCollector<'a, 'tcx> { def_id, substs, ty::ClosureKind::FnOnce, - ); + ) + .expect("failed to normalize and resolve closure during codegen"); if should_codegen_locally(self.tcx, &instance) { self.output.push(create_fn_mono_item(self.tcx, instance, span)); } |
