about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2018-01-15 18:52:42 +0000
committervarkor <github@varkor.com>2018-01-19 00:42:14 +0000
commitc8e9da44a9e361b43548cb60a46cf3c2138968c7 (patch)
tree184aa76d21a7e237161c096c1d277a3f17930595
parente60b0f802b438d350ccd1ec1b42f515994b1a4c0 (diff)
Update comments about the partitioning inefficiency
-rw-r--r--src/librustc_mir/monomorphize/partitioning.rs2
-rw-r--r--src/librustc_trans/base.rs4
2 files changed, 1 insertions, 5 deletions
diff --git a/src/librustc_mir/monomorphize/partitioning.rs b/src/librustc_mir/monomorphize/partitioning.rs
index 4150f9f9548..806d787c845 100644
--- a/src/librustc_mir/monomorphize/partitioning.rs
+++ b/src/librustc_mir/monomorphize/partitioning.rs
@@ -427,8 +427,6 @@ fn merge_codegen_units<'tcx>(initial_partitioning: &mut PreInliningPartitioning<
     codegen_units.sort_by_key(|cgu| cgu.name().clone());
 
     // Merge the two smallest codegen units until the target size is reached.
-    // Note that "size" is estimated here rather inaccurately as the number of
-    // translation items in a given unit. This could be improved on.
     while codegen_units.len() > target_cgu_count {
         // Sort small cgus to the back
         codegen_units.sort_by_key(|cgu| usize::MAX - cgu.size_estimate());
diff --git a/src/librustc_trans/base.rs b/src/librustc_trans/base.rs
index e03b6ee794d..1126c9d2c8c 100644
--- a/src/librustc_trans/base.rs
+++ b/src/librustc_trans/base.rs
@@ -824,9 +824,7 @@ pub fn trans_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
     ongoing_translation.submit_pre_translated_module_to_llvm(tcx, metadata_module);
 
     // We sort the codegen units by size. This way we can schedule work for LLVM
-    // a bit more efficiently. Note that "size" is defined rather crudely at the
-    // moment as it is just the number of TransItems in the CGU, not taking into
-    // account the size of each TransItem.
+    // a bit more efficiently.
     let codegen_units = {
         let mut codegen_units = codegen_units;
         codegen_units.sort_by_key(|cgu| usize::MAX - cgu.size_estimate());