Streamline some comments.

This commit is contained in:
Nicholas Nethercote 2023-06-16 15:16:38 +10:00
parent 006a26c0b5
commit f6cadae163

View File

@ -175,10 +175,9 @@ where
debug_dump(tcx, "MERGE", &codegen_units, unique_inlined_stats); debug_dump(tcx, "MERGE", &codegen_units, unique_inlined_stats);
} }
// In the next step, we use the inlining map to determine which additional // Use the usage map to put additional mono items in each codegen unit:
// monomorphizations have to go into each codegen unit. These additional // drop-glue, functions from external crates, and local functions the
// monomorphizations can be drop-glue, functions from external crates, and // definition of which is marked with `#[inline]`.
// local functions the definition of which is marked with `#[inline]`.
{ {
let _prof_timer = tcx.prof.generic_activity("cgu_partitioning_place_inline_items"); let _prof_timer = tcx.prof.generic_activity("cgu_partitioning_place_inline_items");
place_inlined_mono_items(cx, &mut codegen_units); place_inlined_mono_items(cx, &mut codegen_units);
@ -190,8 +189,8 @@ where
debug_dump(tcx, "INLINE", &codegen_units, unique_inlined_stats); debug_dump(tcx, "INLINE", &codegen_units, unique_inlined_stats);
} }
// Next we try to make as many symbols "internal" as possible, so LLVM has // Make as many symbols "internal" as possible, so LLVM has more freedom to
// more freedom to optimize. // optimize.
if !tcx.sess.link_dead_code() { if !tcx.sess.link_dead_code() {
let _prof_timer = tcx.prof.generic_activity("cgu_partitioning_internalize_symbols"); let _prof_timer = tcx.prof.generic_activity("cgu_partitioning_internalize_symbols");
internalize_symbols(cx, &mut codegen_units, internalization_candidates); internalize_symbols(cx, &mut codegen_units, internalization_candidates);