Skip to content

Commit 447c90e

Browse files
committed
Auto merge of rust-lang#122744 - RalfJung:check-mono-items, r=<try>
experiment: run mono-item collection in check build r? `@ghost` This is just to get an upper bound to the perf overhead associated with fixing rust-lang#99682. We could be a bit more clever and only perform collection, not partitioning, or even more clever and do "mentioned items" collection rather than full collection (when rust-lang#122568 lands) -- but for now let's just get a ballpark number.
2 parents a385e56 + ceefc85 commit 447c90e

File tree

1 file changed

+4
-4
lines changed
  • compiler/rustc_codegen_ssa/src

1 file changed

+4
-4
lines changed

compiler/rustc_codegen_ssa/src/base.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,10 @@ pub fn codegen_crate<B: ExtraBackendMethods>(
573573
metadata: EncodedMetadata,
574574
need_metadata_module: bool,
575575
) -> OngoingCodegen<B> {
576+
// Run the monomorphization collector and partition the collected items into
577+
// codegen units.
578+
let codegen_units = tcx.collect_and_partition_mono_items(()).1;
579+
576580
// Skip crate items and just output metadata in -Z no-codegen mode.
577581
if tcx.sess.opts.unstable_opts.no_codegen || !tcx.sess.opts.output_types.should_codegen() {
578582
let ongoing_codegen = start_async_codegen(backend, tcx, target_cpu, metadata, None);
@@ -586,10 +590,6 @@ pub fn codegen_crate<B: ExtraBackendMethods>(
586590

587591
let cgu_name_builder = &mut CodegenUnitNameBuilder::new(tcx);
588592

589-
// Run the monomorphization collector and partition the collected items into
590-
// codegen units.
591-
let codegen_units = tcx.collect_and_partition_mono_items(()).1;
592-
593593
// Force all codegen_unit queries so they are already either red or green
594594
// when compile_codegen_unit accesses them. We are not able to re-execute
595595
// the codegen_unit query from just the DepNode, so an unknown color would

0 commit comments

Comments
 (0)