From 59c5259bc92542f76db04cfc96bdb92c4b15401a Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 24 May 2023 11:50:32 +1000 Subject: [PATCH] Add a clarifying comment. This is something that took me some time to figure out. --- compiler/rustc_monomorphize/src/partitioning/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/rustc_monomorphize/src/partitioning/mod.rs b/compiler/rustc_monomorphize/src/partitioning/mod.rs index dd0a35c4402..25c10df18a1 100644 --- a/compiler/rustc_monomorphize/src/partitioning/mod.rs +++ b/compiler/rustc_monomorphize/src/partitioning/mod.rs @@ -259,6 +259,8 @@ where debug_dump(tcx, "INITIAL PARTITIONING", &codegen_units); // Merge until we have at most `max_cgu_count` codegen units. + // `merge_codegen_units` is responsible for updating the CGU size + // estimates. { let _prof_timer = tcx.prof.generic_activity("cgu_partitioning_merge_cgus"); partitioner.merge_codegen_units(cx, &mut codegen_units);