Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[perf] Disable inline_in_all_cgus when LTO is enabled #65052

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/librustc/mir/mono.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::dep_graph::{WorkProductId, DepNode, WorkProduct, DepConstructor};
use rustc_data_structures::base_n;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use crate::ich::{Fingerprint, StableHashingContext, NodeIdHashingMode};
use crate::session::config::OptLevel;
use crate::session::config::{OptLevel, Lto};
use std::fmt;
use std::hash::Hash;

Expand Down Expand Up @@ -89,7 +89,7 @@ impl<'tcx> MonoItem<'tcx> {
pub fn instantiation_mode(&self, tcx: TyCtxt<'tcx>) -> InstantiationMode {
let inline_in_all_cgus =
tcx.sess.opts.debugging_opts.inline_in_all_cgus.unwrap_or_else(|| {
tcx.sess.opts.optimize != OptLevel::No
tcx.sess.opts.optimize != OptLevel::No && tcx.sess.lto() == Lto::No
}) && !tcx.sess.opts.cg.link_dead_code;

match *self {
Expand Down
204 changes: 0 additions & 204 deletions src/librustc_mir/monomorphize/item.rs

This file was deleted.