-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Improve OwnedSlice and use it in HIR #30095
Conversation
Why aren't we using |
|
Yep, |
Updated. |
For reference, the RawVec type enables |
☔ The latest upstream changes (presumably #29850) made this pull request unmergeable. Please resolve the merge conflicts. |
Rebased. |
☔ The latest upstream changes (presumably #30241) made this pull request unmergeable. Please resolve the merge conflicts. |
Rebased. |
Still failing a test and looks genuine |
I think the end result would be less confusing if you don't use the name |
r+ with the above two comments addressed |
The idea was to 1) Keep the code changes small (so, the name
Hmm, it certainly doesn't segfault on my machine, I'll try to rerun on something else. |
there is already code churn from |
I've renamed |
Some investigation results: First of all, I don't know if this PR introduces this codegen bug, or just uncovers some existing one. |
☔ The latest upstream changes (presumably #30087) made this pull request unmergeable. Please resolve the merge conflicts. |
This sounds like a great case for RR |
☔ The latest upstream changes (presumably #30145) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #30206) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #30341) made this pull request unmergeable. Please resolve the merge conflicts. |
Part of rust-lang#30095 not causing mysterious segfaults. r? @nrc
Part of rust-lang#30095 not causing mysterious segfaults. r? @nrc
Part of rust-lang/rust#30095 not causing mysterious segfaults. r? @nrc
Most of the changes are to support switching between vector-like containers in HIR and beefing up
OwnedSlice
's interface.The actual change from
Vec
toOwnedSlice
is one line, and it can be changed back if necessary.Memory consumption for librustc, libcore and libstd is below under the spoilers - the changes are small, but consistent.
libcore is the most noticeable, 5.7% less memory immediately after lowering to HIR, 4% less memory during type checking.
Before:
After:
r? @nrc or @eddyb