diff options
| author | Ben Kimock <kimockb@gmail.com> | 2024-12-05 12:51:19 -0500 |
|---|---|---|
| committer | Ben Kimock <kimockb@gmail.com> | 2025-01-27 23:48:47 -0500 |
| commit | bf9df97660f2360bff4acf5231c5396eeaf1d3db (patch) | |
| tree | aa65e88696016d9ed9f42555e7781f0cebbcfad0 /compiler/rustc_middle | |
| parent | ed43cbcb882e7c06870abdd9305dc1f17eb9bab9 (diff) | |
| download | rust-bf9df97660f2360bff4acf5231c5396eeaf1d3db.tar.gz rust-bf9df97660f2360bff4acf5231c5396eeaf1d3db.zip | |
Remove -Zinline-in-all-cgus and clean up CGU partitioning tests
Diffstat (limited to 'compiler/rustc_middle')
| -rw-r--r-- | compiler/rustc_middle/src/mir/mono.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/compiler/rustc_middle/src/mir/mono.rs b/compiler/rustc_middle/src/mir/mono.rs index 111c3b6956a..327405d7537 100644 --- a/compiler/rustc_middle/src/mir/mono.rs +++ b/compiler/rustc_middle/src/mir/mono.rs @@ -91,13 +91,8 @@ impl<'tcx> MonoItem<'tcx> { } pub fn instantiation_mode(&self, tcx: TyCtxt<'tcx>) -> InstantiationMode { - let generate_cgu_internal_copies = tcx - .sess - .opts - .unstable_opts - .inline_in_all_cgus - .unwrap_or_else(|| tcx.sess.opts.optimize != OptLevel::No) - && !tcx.sess.link_dead_code(); + let generate_cgu_internal_copies = + (tcx.sess.opts.optimize != OptLevel::No) && !tcx.sess.link_dead_code(); match *self { MonoItem::Fn(ref instance) => { @@ -121,8 +116,8 @@ impl<'tcx> MonoItem<'tcx> { } // At this point we don't have explicit linkage and we're an - // inlined function. If we're inlining into all CGUs then we'll - // be creating a local copy per CGU. + // inlined function. If this crate's build settings permit, + // we'll be creating a local copy per CGU. if generate_cgu_internal_copies { return InstantiationMode::LocalCopy; } |
