Skip to content

Commit f18bdd5

Browse files
committed
update hir stats
1 parent 404a488 commit f18bdd5

File tree

3 files changed

+29
-17
lines changed

3 files changed

+29
-17
lines changed

compiler/rustc_hir/src/hir.rs

+13-1
Original file line numberDiff line numberDiff line change
@@ -4079,14 +4079,26 @@ impl<'hir> Node<'hir> {
40794079
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
40804080
mod size_asserts {
40814081
use super::*;
4082-
// tidy-alphabetical-start
40834082
static_assert_size!(Block<'_>, 48);
40844083
static_assert_size!(Body<'_>, 32);
4084+
#[cfg(bootstrap)]
40854085
static_assert_size!(Expr<'_>, 64);
4086+
#[cfg(not(bootstrap))]
4087+
static_assert_size!(Expr<'_>, 56);
4088+
#[cfg(bootstrap)]
40864089
static_assert_size!(ExprKind<'_>, 48);
4090+
#[cfg(not(bootstrap))]
4091+
static_assert_size!(ExprKind<'_>, 40);
40874092
static_assert_size!(FnDecl<'_>, 40);
4093+
#[cfg(bootstrap)]
40884094
static_assert_size!(ForeignItem<'_>, 72);
4095+
#[cfg(not(bootstrap))]
4096+
static_assert_size!(ForeignItem<'_>, 64);
4097+
#[cfg(bootstrap)]
40894098
static_assert_size!(ForeignItemKind<'_>, 40);
4099+
#[cfg(not(bootstrap))]
4100+
static_assert_size!(ForeignItemKind<'_>, 32);
4101+
// tidy-alphabetical-start
40904102
static_assert_size!(GenericArg<'_>, 32);
40914103
static_assert_size!(GenericBound<'_>, 48);
40924104
static_assert_size!(Generics<'_>, 56);

tests/ui/stats/hir-stats.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// check-pass
22
// compile-flags: -Zhir-stats
33
// only-x86_64
4-
4+
// ignore-stage1
55
// Type layouts sometimes change. When that happens, until the next bootstrap
66
// bump occurs, stage1 and stage2 will give different outputs for this test.
77
// Add an `ignore-stage1` comment marker to work around that problem during

tests/ui/stats/hir-stats.stderr

+15-15
Original file line numberDiff line numberDiff line change
@@ -146,33 +146,33 @@ hir-stats - Trait 192 ( 2.1%) 4
146146
hir-stats WherePredicate 192 ( 2.1%) 3 64
147147
hir-stats - BoundPredicate 192 ( 2.1%) 3
148148
hir-stats Block 288 ( 3.2%) 6 48
149-
hir-stats Pat 360 ( 3.9%) 5 72
149+
hir-stats Pat 360 ( 4.0%) 5 72
150150
hir-stats - Wild 72 ( 0.8%) 1
151151
hir-stats - Struct 72 ( 0.8%) 1
152152
hir-stats - Binding 216 ( 2.4%) 3
153153
hir-stats GenericParam 400 ( 4.4%) 5 80
154-
hir-stats Generics 560 ( 6.1%) 10 56
155-
hir-stats Ty 720 ( 7.9%) 15 48
154+
hir-stats Generics 560 ( 6.2%) 10 56
155+
hir-stats Expr 672 ( 7.4%) 12 56
156+
hir-stats - Path 56 ( 0.6%) 1
157+
hir-stats - Struct 56 ( 0.6%) 1
158+
hir-stats - Match 56 ( 0.6%) 1
159+
hir-stats - InlineAsm 56 ( 0.6%) 1
160+
hir-stats - Lit 112 ( 1.2%) 2
161+
hir-stats - Block 336 ( 3.7%) 6
162+
hir-stats Ty 720 ( 8.0%) 15 48
156163
hir-stats - Ptr 48 ( 0.5%) 1
157164
hir-stats - Ref 48 ( 0.5%) 1
158-
hir-stats - Path 624 ( 6.8%) 13
159-
hir-stats Expr 768 ( 8.4%) 12 64
160-
hir-stats - Path 64 ( 0.7%) 1
161-
hir-stats - Struct 64 ( 0.7%) 1
162-
hir-stats - Match 64 ( 0.7%) 1
163-
hir-stats - InlineAsm 64 ( 0.7%) 1
164-
hir-stats - Lit 128 ( 1.4%) 2
165-
hir-stats - Block 384 ( 4.2%) 6
166-
hir-stats Item 968 (10.6%) 11 88
165+
hir-stats - Path 624 ( 6.9%) 13
166+
hir-stats Item 968 (10.7%) 11 88
167167
hir-stats - Trait 88 ( 1.0%) 1
168168
hir-stats - Enum 88 ( 1.0%) 1
169169
hir-stats - ExternCrate 88 ( 1.0%) 1
170170
hir-stats - ForeignMod 88 ( 1.0%) 1
171171
hir-stats - Impl 88 ( 1.0%) 1
172172
hir-stats - Fn 176 ( 1.9%) 2
173173
hir-stats - Use 352 ( 3.9%) 4
174-
hir-stats Path 1_240 (13.6%) 31 40
175-
hir-stats PathSegment 1_920 (21.0%) 40 48
174+
hir-stats Path 1_240 (13.7%) 31 40
175+
hir-stats PathSegment 1_920 (21.2%) 40 48
176176
hir-stats ----------------------------------------------------------------
177-
hir-stats Total 9_136
177+
hir-stats Total 9_040
178178
hir-stats

0 commit comments

Comments
 (0)