-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Tell rustc about unused bits in Span. #102035
Conversation
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 63596860eb24e80b8e7d024d11f983296a262f2c with merge 9b1b504285e7b4440ae811dc71fbffdc7be2ec92... |
☀️ Try build successful - checks-actions |
Queued 9b1b504285e7b4440ae811dc71fbffdc7be2ec92 with parent 2019147, future comparison URL. |
Finished benchmarking commit (9b1b504285e7b4440ae811dc71fbffdc7be2ec92): comparison URL. Overall result: ❌ regressions - 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @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)ResultsThis 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.
CyclesResultsThis 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.
Footnotes |
Hmm.
|
I marking this PR as blocked on improvements to niche optimization tracked by #101872 |
This shrinks the size of `Option<Span>` and similar types, which shrinks several AST and HIR nodes. The most important of these are `hir::Expr` and `ast::Ty`. This change was first attempted in rust-lang#93747 where it had little effect. But the improved niche-filling implemented by rust-lang#94075 means this change now has a much bigger effect. Co-authored-by: Camille Gillot <gillot.camille@gmail.com>
Let's try a perf run again, just to see what happens. @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 273fb2a with merge 5445699cee92d57d2c75196ec6b23d56f65dbdca... |
☀️ Try build successful - checks-actions |
Queued 5445699cee92d57d2c75196ec6b23d56f65dbdca with parent 9c2797d, future comparison URL. |
Finished benchmarking commit (5445699cee92d57d2c75196ec6b23d56f65dbdca): comparison URL. Overall result: ❌ regressions - 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @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)ResultsThis 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. Footnotes |
visiting and checking progress. according to this comment this is waiting on #101872 which in turn is waiting on an LLVM optimization. Correct @cjgillot @nnethercote ? |
That's correct. |
@cjgillot: I just tried to update this, but things have changed in Span representation, because of parent fields. Is this change still applicable in a modified form? |
I don't think so. I used those very unused bits to encode the presence of the parent. |
This change no longer works, due to other changes that have happened in the meantime. |
This shrinks the size of
Option<Span>
and similar types, which shrinks several AST and HIR nodes. The most important of these arehir::Expr
andast::Ty
.This change was first attempted in #93747 where it had little effect. But the improved niche-filling implemented by #94075 means this change now has a much bigger effect.
r? @cjgillot