Skip to content

Commit a8c71f0

Browse files
committed
Inline and remove submit_pre_codegened_module_to_llvm.
It has a single callsite, and provides little value.
1 parent dfc9d3f commit a8c71f0

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

compiler/rustc_codegen_ssa/src/back/write.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1962,19 +1962,6 @@ impl<B: ExtraBackendMethods> OngoingCodegen<B> {
19621962
)
19631963
}
19641964

1965-
pub fn submit_pre_codegened_module_to_llvm(
1966-
&self,
1967-
tcx: TyCtxt<'_>,
1968-
module: ModuleCodegen<B::Module>,
1969-
) {
1970-
self.wait_for_signal_to_codegen_item();
1971-
self.check_for_errors(tcx.sess);
1972-
1973-
// These are generally cheap and won't throw off scheduling.
1974-
let cost = 0;
1975-
submit_codegened_module_to_llvm(&self.backend, &self.coordinator.sender, module, cost);
1976-
}
1977-
19781965
pub fn codegen_finished(&self, tcx: TyCtxt<'_>) {
19791966
self.wait_for_signal_to_codegen_item();
19801967
self.check_for_errors(tcx.sess);

compiler/rustc_codegen_ssa/src/base.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,9 +664,16 @@ pub fn codegen_crate<B: ExtraBackendMethods>(
664664
)
665665
});
666666

667-
ongoing_codegen.submit_pre_codegened_module_to_llvm(
668-
tcx,
667+
ongoing_codegen.wait_for_signal_to_codegen_item();
668+
ongoing_codegen.check_for_errors(tcx.sess);
669+
670+
// These modules are generally cheap and won't throw off scheduling.
671+
let cost = 0;
672+
submit_codegened_module_to_llvm(
673+
&backend,
674+
&ongoing_codegen.coordinator.sender,
669675
ModuleCodegen { name: llmod_id, module_llvm, kind: ModuleKind::Allocator },
676+
cost,
670677
);
671678
}
672679

0 commit comments

Comments
 (0)