Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0b1521f

Browse files
committedSep 26, 2019
Auto merge of #64816 - Centril:rollup-gbeqot4, r=Centril
Rollup of 5 pull requests Successful merges: - #64221 ( Rust 2015: No longer downgrade NLL errors) - #64772 (Remove tx_to_llvm_workers from TyCtxt) - #64783 (Fix issue #64732) - #64787 (Fix ExitStatus on Fuchsia) - #64812 (Add test for E0543) Failed merges: r? @ghost
2 parents ddf4386 + 02a8505 commit 0b1521f

File tree

105 files changed

+367
-2003
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+367
-2003
lines changed
 

‎src/librustc/ty/context.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ use std::fmt;
6464
use std::mem;
6565
use std::ops::{Deref, Bound};
6666
use std::iter;
67-
use std::sync::mpsc;
6867
use std::sync::Arc;
6968
use rustc_target::spec::abi;
7069
use rustc_macros::HashStable;
@@ -1064,14 +1063,6 @@ pub struct GlobalCtxt<'tcx> {
10641063

10651064
layout_interner: ShardedHashMap<&'tcx LayoutDetails, ()>,
10661065

1067-
/// A general purpose channel to throw data out the back towards LLVM worker
1068-
/// threads.
1069-
///
1070-
/// This is intended to only get used during the codegen phase of the compiler
1071-
/// when satisfying the query for a particular codegen unit. Internally in
1072-
/// the query it'll send data along this channel to get processed later.
1073-
pub tx_to_llvm_workers: Lock<mpsc::Sender<Box<dyn Any + Send>>>,
1074-
10751066
output_filenames: Arc<OutputFilenames>,
10761067
}
10771068

@@ -1184,7 +1175,6 @@ impl<'tcx> TyCtxt<'tcx> {
11841175
hir: hir_map::Map<'tcx>,
11851176
on_disk_query_result_cache: query::OnDiskCache<'tcx>,
11861177
crate_name: &str,
1187-
tx: mpsc::Sender<Box<dyn Any + Send>>,
11881178
output_filenames: &OutputFilenames,
11891179
) -> GlobalCtxt<'tcx> {
11901180
let data_layout = TargetDataLayout::parse(&s.target.target).unwrap_or_else(|err| {
@@ -1291,7 +1281,6 @@ impl<'tcx> TyCtxt<'tcx> {
12911281
stability_interner: Default::default(),
12921282
allocation_interner: Default::default(),
12931283
alloc_map: Lock::new(interpret::AllocMap::new()),
1294-
tx_to_llvm_workers: Lock::new(tx),
12951284
output_filenames: Arc::new(output_filenames.clone()),
12961285
}
12971286
}

‎src/librustc_codegen_llvm/base.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ pub fn iter_globals(llmod: &'ll llvm::Module) -> ValueIter<'ll> {
103103
}
104104
}
105105

106-
pub fn compile_codegen_unit(tcx: TyCtxt<'tcx>, cgu_name: InternedString) {
106+
pub fn compile_codegen_unit(
107+
tcx: TyCtxt<'tcx>,
108+
cgu_name: InternedString,
109+
tx_to_llvm_workers: &std::sync::mpsc::Sender<Box<dyn std::any::Any + Send>>,
110+
) {
107111
let start_time = Instant::now();
108112

109113
let dep_node = tcx.codegen_unit(cgu_name).codegen_dep_node(tcx);
@@ -121,7 +125,7 @@ pub fn compile_codegen_unit(tcx: TyCtxt<'tcx>, cgu_name: InternedString) {
121125
let cost = time_to_codegen.as_secs() * 1_000_000_000 +
122126
time_to_codegen.subsec_nanos() as u64;
123127

124-
submit_codegened_module_to_llvm(&LlvmCodegenBackend(()), tcx, module, cost);
128+
submit_codegened_module_to_llvm(&LlvmCodegenBackend(()), tx_to_llvm_workers, module, cost);
125129

126130
fn module_codegen(
127131
tcx: TyCtxt<'_>,

0 commit comments

Comments
 (0)
Please sign in to comment.