-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Improve support for NewPM #83894
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 support for NewPM #83894
Conversation
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 981744e31838ae78a243bbf928fcd1a876a3864a with merge b1b723b5dc62feaeb9a176d276f190f0aa045d0a... |
☀️ Try build successful - checks-actions |
Queued b1b723b5dc62feaeb9a176d276f190f0aa045d0a with parent 39eee17, future comparison URL. |
Finished benchmarking try commit (b1b723b5dc62feaeb9a176d276f190f0aa045d0a): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
No? We run with -j1, so the bootstrap should be single threaded. I'm not sure, but I seem to recall the total being computed client side in the UI - would be worth checking that, I suppose. |
Nevermind, I eyeballed it wrong. I checked with a spreadsheet now and everything is consistent. |
Some really nice improvements! The code looks fine, but I am not the most qualified person for this part of the codebase. @rust-lang/compiler anyone can take on this review? |
r? @nagisa |
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.
Overall this LGTM implementation wise. A couple comments inline. r=me after those are resolved.
I wish we had a better explanation for why we could drop some of the older workarounds (e.g. forcing of -O1
) and an explanation of how things break with -opt-bisect-limit=0
in the commit message(s).
I've made those commit messages a bit more detailed. For For |
); | ||
result.into_result().map_err(|()| llvm_err(diag_handler, "Failed to run LLVM passes")) |
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.
I think this Failed
wants to be non-capitalized. Ends up as error: Failed…
now which looks out of place.
r=me with non-capital f. |
@bors r=nagisa rollup=never |
📌 Commit 4903c075fdb6de4b0eba1461de6dae4a2b1b6d0a has been approved by |
⌛ Testing commit 4903c075fdb6de4b0eba1461de6dae4a2b1b6d0a with merge 07f00298b1780075a702e0d3926cf0fd2aec8eed... |
FYI, a few days ago Arthur proposed legacy PM deprecation: https://lists.llvm.org/pipermail/llvm-dev/2021-April/150100.html
He was corrected that the switch will only happen in 13, so that would mean it could be announced deprecated in 14, and I suppose it may start getting crippled or even removed soon after. Regardless, that's more emphasis that we should definitely switch rustc when we get to 13. |
⌛ Testing commit fdacbd2574fb891e2ba1a19615ae6ed2dac26b53 with merge 028fe2358ac144ac35144a9e2e31dfe00a0cbdc0... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
Reduction of the assertion failure:
Which is already fixed by llvm/llvm-project@c2b322f and backported in llvm/llvm-project@fa0971b -- and which is the first 12.x commit not in our fork, duh. |
To allow it to have an LLVM version dependent default.
Don't use "passes" for this purpose, explicitly insert it into the correct place in the pipeline instead.
This causes an assertion failure under NewPM, because it also ends up disabling the NameAnonGlobals pass. Instead pass -Copt-level=0 to disable optimizations. If that should be insufficient, we can use -C no-prepopulate-passes.
This doesn't seem to be necessary anymore, although I don't know at which point or why that changed. Forcing -O1 makes some tests fail under NewPM, because NewPM also performs inlining at -O1, so it ends up performing much more optimization in practice than before.
And report an error if parsing the additional pass pipeline fails. Threading through the error accounts for most of the changes here.
This updates the LLVM submodule with recent LLVM 12.x fixes. In particular, it resolves an assertion failure when targeting AArch64 at O0.
I've merged current upstream 12.x into our fork, and have added the submodule update here. That should resolve the AArch64 assertion failure. |
@bors r+ |
📌 Commit 1b928ff has been approved by |
☀️ Test successful - checks-actions |
Hrm, it looks like the
|
This adds various missing bits of support for NewPM and allows us to successfully run stage 2 tests with NewPM enabled.
This does not yet enable NewPM by default, as there are still known issue on LLVM 12 (such as a weak fat LTO pipeline). The plan is to make the switch after we update to LLVM 13.