-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encode ADT flags rather than recreating them from scratch at decoding time #127466
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Encode ADT flags rather than recreating them from scratch at decoding time r? lcnr
/// Creates a new `AdtDefData`. | ||
pub(super) fn new( | ||
tcx: TyCtxt<'_>, | ||
did: DefId, | ||
did: LocalDefId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting this to local so we enforce that AdtDefData::new
is called only on local def ids.
@@ -249,15 +249,25 @@ impl Into<DataTypeKind> for AdtKind { | |||
} | |||
|
|||
impl AdtDefData { | |||
pub(super) fn new_from_flags( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this ctor is kinda redundant, i could also just make all the fields pub(super)
-- OR just pull TyCtxt::mk_adt_def_from_flags
/TyCtxt::mk_adt_def
into a new impl in this module. I don't really care.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (77c0460): comparison URL. Overall result: ❌✅ regressions and improvements - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary 0.3%, secondary 6.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeResults (primary 0.3%, secondary 0.8%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 699.476s -> 699.246s (-0.03%) |
Likely noise |
@bors r+ rollup=never |
☔ The latest upstream changes (presumably #127476) made this pull request unmergeable. Please resolve the merge conflicts. |
e89a228
to
65f6819
Compare
@bors r=lcnr |
@bors r- The binary size regression is real What's the motivation for this? |
(Note that this only seems to affect metadata size, not actual binary size of binaries.) I was also wondering about the motivation given this size regression though. |
This was requested in #127437 (comment). @lcnr has some interest in migrating the compiler to stop encoding built-in attrs across crates. IDK if they have a tracking issue for this, but if they don't, they should probably make one. I don't particularly care about this work, so if anyone wants to pick it up, they can do it. |
r? lcnr