-
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
Stop llvm.expect
ing assert terminators
#124606
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Stop `llvm.expect`ing assert terminators r? ghost
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (b1efbc0): comparison URL. Overall result: ✅ 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)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. 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: 671.059s -> 675.174s (0.61%) |
Interesting, dropping the expect gave a "1611442.25x Significance Factor" instruction improvement on the |
Yeah, me too :( Didn't have a lot of time recently to work on the rustc-perf UI, sadly. However, we now have a GSoC 2024 project to improve the rustc-perf frontend, so hopefully this will improve in the future :) |
@bors r+ |
The binary size improvements here looks interesting, except that the artifact sizes reports a smaller libLLVM.so, which doesn't make much sense to me. Strange... |
That's just a small fluctuation that happens on pretty much every commit, even no-op ones. Possibly caused by PGO/BOLT. |
@saethlin Probably PGO in LLVM -- this makes a pretty big difference to how hot the LLVM code is for this, since it used to be called for every arithmetic operation in debug, for example, and now isn't. So it'll definitely churn the LLVM build a bit. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (02f7806): comparison URL. Overall result: ✅ improvements - no action needed@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.
CyclesThis benchmark run did not return any relevant results for this metric. 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: 675.389s -> 676.151s (0.11%) |
We're putting
llvm.expect
calls before the https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/enum.TerminatorKind.html#variant.Assert terminators.But we don't need them. One of the arms is always to a panic function that's marked
#[cold]
, which iscold
https://llvm.org/docs/LangRef.html#function-attributes in LLVM, whichSo even without us emitting the extra intrinsic call, LLVM knows what to expect for the
br
. Thus we can save the (small) effort of emitting it and then LLVM optimizing it out.r? compiler