Remove an LTO dependent cgu_reuse_tracker.set_actual_reuse call
This commit is contained in:
parent
6b9ee90c2c
commit
3dfd9dfe7c
@ -19,7 +19,6 @@ use rustc_hir::def_id::LOCAL_CRATE;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::dep_graph::WorkProduct;
|
||||
use rustc_middle::middle::exported_symbols::{SymbolExportInfo, SymbolExportLevel};
|
||||
use rustc_session::cgu_reuse_tracker::CguReuse;
|
||||
use rustc_session::config::{self, CrateType, Lto};
|
||||
|
||||
use std::ffi::{CStr, CString};
|
||||
@ -584,7 +583,6 @@ fn thin_lto(
|
||||
copy_jobs.push(work_product);
|
||||
info!(" - {}: re-used", module_name);
|
||||
assert!(cgcx.incr_comp_session_dir.is_some());
|
||||
cgcx.cgu_reuse_tracker.set_actual_reuse(module_name, CguReuse::PostLto);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,6 @@ use rustc_metadata::EncodedMetadata;
|
||||
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
|
||||
use rustc_middle::middle::exported_symbols::SymbolExportInfo;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::cgu_reuse_tracker::CguReuseTracker;
|
||||
use rustc_session::config::{self, CrateType, Lto, OutFileName, OutputFilenames, OutputType};
|
||||
use rustc_session::config::{Passes, SwitchWithOptPath};
|
||||
use rustc_session::Session;
|
||||
@ -366,8 +365,6 @@ pub struct CodegenContext<B: WriteBackendMethods> {
|
||||
/// The incremental compilation session directory, or None if we are not
|
||||
/// compiling incrementally
|
||||
pub incr_comp_session_dir: Option<PathBuf>,
|
||||
/// Used to update CGU re-use information during the thinlto phase.
|
||||
pub cgu_reuse_tracker: CguReuseTracker,
|
||||
/// Channel back to the main control thread to send messages to
|
||||
pub coordinator_send: Sender<Box<dyn Any + Send>>,
|
||||
}
|
||||
@ -1119,7 +1116,6 @@ fn start_executing_work<B: ExtraBackendMethods>(
|
||||
remark: sess.opts.cg.remark.clone(),
|
||||
remark_dir,
|
||||
incr_comp_session_dir: sess.incr_comp_session_dir_opt().map(|r| r.clone()),
|
||||
cgu_reuse_tracker: sess.cgu_reuse_tracker.clone(),
|
||||
coordinator_send,
|
||||
expanded_args: tcx.sess.expanded_args.clone(),
|
||||
diag_emitter: shared_emitter.clone(),
|
||||
|
@ -75,13 +75,7 @@ impl CguReuseTracker {
|
||||
debug!("set_actual_reuse({cgu_name:?}, {kind:?})");
|
||||
|
||||
let prev_reuse = data.lock().unwrap().actual_reuse.insert(cgu_name.to_string(), kind);
|
||||
|
||||
if let Some(prev_reuse) = prev_reuse {
|
||||
// The only time it is legal to overwrite reuse state is when
|
||||
// we discover during ThinLTO that we can actually reuse the
|
||||
// post-LTO version of a CGU.
|
||||
assert_eq!(prev_reuse, CguReuse::PreLto);
|
||||
}
|
||||
assert!(prev_reuse.is_none());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user