Skip to content

Commit

Permalink
update hir stats
Browse files Browse the repository at this point in the history
  • Loading branch information
the8472 committed Oct 8, 2023
1 parent 404a488 commit f18bdd5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 17 deletions.
14 changes: 13 additions & 1 deletion compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4079,14 +4079,26 @@ impl<'hir> Node<'hir> {
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
mod size_asserts {
use super::*;
// tidy-alphabetical-start
static_assert_size!(Block<'_>, 48);
static_assert_size!(Body<'_>, 32);
#[cfg(bootstrap)]
static_assert_size!(Expr<'_>, 64);
#[cfg(not(bootstrap))]
static_assert_size!(Expr<'_>, 56);
#[cfg(bootstrap)]
static_assert_size!(ExprKind<'_>, 48);
#[cfg(not(bootstrap))]
static_assert_size!(ExprKind<'_>, 40);
static_assert_size!(FnDecl<'_>, 40);
#[cfg(bootstrap)]
static_assert_size!(ForeignItem<'_>, 72);
#[cfg(not(bootstrap))]
static_assert_size!(ForeignItem<'_>, 64);
#[cfg(bootstrap)]
static_assert_size!(ForeignItemKind<'_>, 40);
#[cfg(not(bootstrap))]
static_assert_size!(ForeignItemKind<'_>, 32);
// tidy-alphabetical-start
static_assert_size!(GenericArg<'_>, 32);
static_assert_size!(GenericBound<'_>, 48);
static_assert_size!(Generics<'_>, 56);
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/stats/hir-stats.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// check-pass
// compile-flags: -Zhir-stats
// only-x86_64

// ignore-stage1
// Type layouts sometimes change. When that happens, until the next bootstrap
// bump occurs, stage1 and stage2 will give different outputs for this test.
// Add an `ignore-stage1` comment marker to work around that problem during
Expand Down
30 changes: 15 additions & 15 deletions tests/ui/stats/hir-stats.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -146,33 +146,33 @@ hir-stats - Trait 192 ( 2.1%) 4
hir-stats WherePredicate 192 ( 2.1%) 3 64
hir-stats - BoundPredicate 192 ( 2.1%) 3
hir-stats Block 288 ( 3.2%) 6 48
hir-stats Pat 360 ( 3.9%) 5 72
hir-stats Pat 360 ( 4.0%) 5 72
hir-stats - Wild 72 ( 0.8%) 1
hir-stats - Struct 72 ( 0.8%) 1
hir-stats - Binding 216 ( 2.4%) 3
hir-stats GenericParam 400 ( 4.4%) 5 80
hir-stats Generics 560 ( 6.1%) 10 56
hir-stats Ty 720 ( 7.9%) 15 48
hir-stats Generics 560 ( 6.2%) 10 56
hir-stats Expr 672 ( 7.4%) 12 56
hir-stats - Path 56 ( 0.6%) 1
hir-stats - Struct 56 ( 0.6%) 1
hir-stats - Match 56 ( 0.6%) 1
hir-stats - InlineAsm 56 ( 0.6%) 1
hir-stats - Lit 112 ( 1.2%) 2
hir-stats - Block 336 ( 3.7%) 6
hir-stats Ty 720 ( 8.0%) 15 48
hir-stats - Ptr 48 ( 0.5%) 1
hir-stats - Ref 48 ( 0.5%) 1
hir-stats - Path 624 ( 6.8%) 13
hir-stats Expr 768 ( 8.4%) 12 64
hir-stats - Path 64 ( 0.7%) 1
hir-stats - Struct 64 ( 0.7%) 1
hir-stats - Match 64 ( 0.7%) 1
hir-stats - InlineAsm 64 ( 0.7%) 1
hir-stats - Lit 128 ( 1.4%) 2
hir-stats - Block 384 ( 4.2%) 6
hir-stats Item 968 (10.6%) 11 88
hir-stats - Path 624 ( 6.9%) 13
hir-stats Item 968 (10.7%) 11 88
hir-stats - Trait 88 ( 1.0%) 1
hir-stats - Enum 88 ( 1.0%) 1
hir-stats - ExternCrate 88 ( 1.0%) 1
hir-stats - ForeignMod 88 ( 1.0%) 1
hir-stats - Impl 88 ( 1.0%) 1
hir-stats - Fn 176 ( 1.9%) 2
hir-stats - Use 352 ( 3.9%) 4
hir-stats Path 1_240 (13.6%) 31 40
hir-stats PathSegment 1_920 (21.0%) 40 48
hir-stats Path 1_240 (13.7%) 31 40
hir-stats PathSegment 1_920 (21.2%) 40 48
hir-stats ----------------------------------------------------------------
hir-stats Total 9_136
hir-stats Total 9_040
hir-stats

0 comments on commit f18bdd5

Please sign in to comment.