Skip to content

Commit 4a120f3

Browse files
committed
Remove ExtraBackendMethods::spawn_thread.
It's no longer used, and `spawn_named_thread` is preferable, because naming threads is helpful when profiling.
1 parent e78fb95 commit 4a120f3

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

compiler/rustc_codegen_llvm/src/lib.rs

-12
Original file line numberDiff line numberDiff line change
@@ -141,18 +141,6 @@ impl ExtraBackendMethods for LlvmCodegenBackend {
141141
back::write::target_machine_factory(sess, optlvl, target_features)
142142
}
143143

144-
fn spawn_thread<F, T>(time_trace: bool, f: F) -> std::thread::JoinHandle<T>
145-
where
146-
F: FnOnce() -> T,
147-
F: Send + 'static,
148-
T: Send + 'static,
149-
{
150-
std::thread::spawn(move || {
151-
let _profiler = TimeTraceProfiler::new(time_trace);
152-
f()
153-
})
154-
}
155-
156144
fn spawn_named_thread<F, T>(
157145
time_trace: bool,
158146
name: String,

compiler/rustc_codegen_ssa/src/traits/backend.rs

-9
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,6 @@ pub trait ExtraBackendMethods:
142142
target_features: &[String],
143143
) -> TargetMachineFactoryFn<Self>;
144144

145-
fn spawn_thread<F, T>(_time_trace: bool, f: F) -> std::thread::JoinHandle<T>
146-
where
147-
F: FnOnce() -> T,
148-
F: Send + 'static,
149-
T: Send + 'static,
150-
{
151-
std::thread::spawn(f)
152-
}
153-
154145
fn spawn_named_thread<F, T>(
155146
_time_trace: bool,
156147
name: String,

0 commit comments

Comments
 (0)