diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2024-11-20 05:08:25 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2024-11-20 05:08:25 +0000 |
| commit | 13dbc8443e0cd254ee08138b60afd4abf1be2d33 (patch) | |
| tree | db6b8e13f9ca4133bfb97e89d2d2760ef8dc5e7a /compiler/rustc_passes/src | |
| parent | 2b751f621c9a8f7bfd294cbbe792a3f1e72aee19 (diff) | |
| parent | 00903cf9c9d2e6e23e76fea25ba8b2627e312bf9 (diff) | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_passes/src')
| -rw-r--r-- | compiler/rustc_passes/src/input_stats.rs (renamed from compiler/rustc_passes/src/hir_stats.rs) | 9 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/lib.rs | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/compiler/rustc_passes/src/hir_stats.rs b/compiler/rustc_passes/src/input_stats.rs index 55fdbac8ad6..db34189be2a 100644 --- a/compiler/rustc_passes/src/hir_stats.rs +++ b/compiler/rustc_passes/src/input_stats.rs @@ -126,6 +126,7 @@ impl<'k> StatCollector<'k> { }); let total_size = nodes.iter().map(|(_, node)| node.stats.count * node.stats.size).sum(); + let total_count = nodes.iter().map(|(_, node)| node.stats.count).sum(); eprintln!("{prefix} {title}"); eprintln!( @@ -167,7 +168,13 @@ impl<'k> StatCollector<'k> { } } eprintln!("{prefix} ----------------------------------------------------------------"); - eprintln!("{} {:<18}{:>10}", prefix, "Total", to_readable_str(total_size)); + eprintln!( + "{} {:<18}{:>10} {:>14}", + prefix, + "Total", + to_readable_str(total_size), + to_readable_str(total_count), + ); eprintln!("{prefix}"); } } diff --git a/compiler/rustc_passes/src/lib.rs b/compiler/rustc_passes/src/lib.rs index 664da65068d..8f53b71319d 100644 --- a/compiler/rustc_passes/src/lib.rs +++ b/compiler/rustc_passes/src/lib.rs @@ -27,7 +27,7 @@ pub mod entry; mod errors; #[cfg(debug_assertions)] pub mod hir_id_validator; -pub mod hir_stats; +pub mod input_stats; mod lang_items; pub mod layout_test; mod lib_features; |
