-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Ignore the always part of #[inline(always)] in MIR inlining #112294
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 5d45d72cd8a4201dfe98ec28d676e2e569d47197 with merge 988256e3d645e9cda49a57c23c799a49d7513fc3... |
This comment has been minimized.
This comment has been minimized.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (988256e3d645e9cda49a57c23c799a49d7513fc3): comparison URL. Overall result: ❌✅ regressions and improvements - 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.
Binary sizeResultsThis 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: 646.397s -> 653.496s (1.10%) |
r? mir-opt |
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt The Miri subtree was changed cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
The justification for this change should be recorded in the code itself via a comment. Otherwise someone is bound to accidentally revert this eventually. |
☔ The latest upstream changes (presumably #112418) made this pull request unmergeable. Please resolve the merge conflicts. |
211c4d1
to
b604e35
Compare
@bors r+ |
📌 Commit b604e358063f8d392f05b87e506933597f662a59 has been approved by It is now in the queue for this repository. |
☔ The latest upstream changes (presumably #112346) made this pull request unmergeable. Please resolve the merge conflicts. |
b604e35
to
ee641cf
Compare
@oli-obk I think in the rebase I tweaked some of the way I patched up some of the mir-opt tests. Wouldn't hurt for you to take a look and make sure you still agree with what I've done. |
ee641cf
to
c153f3a
Compare
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (6bba061): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression 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.
Binary sizeResultsThis 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: 646.921s -> 655.492s (1.32%) |
Since the perf regressions are justified in the PR description, I'll mark this as triaged. @rustbot label: +perf-regression-triaged |
#[inline(always)]
is used in two cases: for functions that are so trivial it is always profitable to inline them, but also for functions which LLVM thinks are a bad inlining candidate, but which actually turn out to be profitable to inline. That second justification doesn't apply to the MIR inliner, so ignoring our cost estimation for these functions is not necessarily the right right thing to do.This is basically a wash on non-check runs and a perf benefit in check runs. There are some notable regressions, and I think we might be able to claw those back by turning
#[inline(always)]
into a stronger hint. But I think this PR stands decently on its own as a tidy simplification.