Uh oh!
There was an error while loading. Please reload this page.
Disable LLVM verification by default - #51230
Conversation
rust-highfive
commented
May 30, 2018
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
emilyalbini
commented
Jun 4, 2018
Ping from triage @pnkfelix! This PR needs your review. |
TimNN
commented
Jun 12, 2018
Ping from triage, @pnkfelix / @rust-lang/compiler, this PR needs your review. |
oli-obk
commented
Jun 12, 2018
Sidenote: I do dislike the If you change this to a |
Currently -Z no-verify only controls IR verification prior to LLVM codegen, while verification is performed unconditionally both before and after linking with (Thin)LTO.
This disables IR verification by default.
nikic
commented
Jun 12, 2018
I've pushed a variant that renames Should I add a config.toml flag for this as well? |
oli-obk
commented
Jun 12, 2018
seems sensible, people will want to turn this on for debugging llvm crashes. Can we turn this on on the dev-channel automatically? |
nikic
commented
Jun 12, 2018
I've added an (untested) implementation of the config.toml flag. What does enabling it on the dev-channel mean? |
oli-obk
commented
Jun 13, 2018
@bors try let's do a perf run |
bors
commented
Jun 13, 2018
Respect -Z no-verify during LTO Currently -Z no-verify only controls IR verification prior to LLVM codegen, while verification is performed unconditionally both before and after linking with (Thin)LTO. Also wondering what the sentiment is on disabling verification by default (and e.g. only enabling it on ALT builds with assertions). This does not seem terribly useful outside of rustc development and it does seem to show up in profiles (at something like 3%).
bors
commented
Jun 13, 2018
☀️ Test successful - status-travis |
emilyalbini
commented
Jun 13, 2018
Mark-Simulacrum
commented
Jun 13, 2018
Perf queued. |
nikic
commented
Jun 14, 2018
So 1-3% improvement across the board (apart from check builds, which don't touch LLVM). |
emilyalbini
commented
Jun 18, 2018
Ping from triage @pnkfelix! This PR needs your review. |
pnkfelix
commented
Jun 18, 2018
I'm a little wary of turning off verification unconditionally across the board. I understand the sentiment that it is only useful for compiler development, but in practice I think it has caught bugs for us. Could we perhaps leave verification on by default in the nightly channel, and turn it off by default in the stable (and beta?) channels? Nominating for discussion at rustc team meeting. |
bors
commented
Jul 10, 2018
📌 Commit 3f18a41 has been approved by |
bors
commented
Jul 11, 2018
⌛ Testing commit 3f18a41 with merge 63d9e0003894440cad59003a0938d4c30a4d6f53... |
bors
commented
Jul 11, 2018
💔 Test failed - status-travis |
rust-highfive
commented
Jul 11, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
1 similar comment
rust-highfive
commented
Jul 11, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
kennytm
commented
Jul 11, 2018
bors
commented
Jul 11, 2018
Disable LLVM verification by default Currently -Z no-verify only controls IR verification prior to LLVM codegen, while verification is performed unconditionally both before and after linking with (Thin)LTO. Also wondering what the sentiment is on disabling verification by default (and e.g. only enabling it on ALT builds with assertions). This does not seem terribly useful outside of rustc development and it does seem to show up in profiles (at something like 3%). **EDIT:** A table showing the various configurations and what is enabled when. | Configuration | Dynamic verification performed | LLVM static assertions compiled in | | --- | --- | --- | | alt builds | | yes | | nightly builds | | no | | stable builds | | no | | CI builds | | | | dev builds in a checkout | | |
bors
commented
Jul 11, 2018
☀️ Test successful - status-appveyor, status-travis |
nnethercote
commented
Jul 12, 2018
perf.rust-lang.org results show 1--3% speedups on lots of opt and debug benchmark builds: Nice work! |
Is there a nightly build with all verification, assertions (debug_asserts in rustc, in std, ...), LLVM assertions, etc. turned on that one can use during development? Like every now and then LLVM crashes and the first step to debug the issue is "recompile the world with LLVM with assertions enabled", which basically adds over one hour of cost upfront to start debugging an issue that might just end up being an user error. I would find something like |
Mark-Simulacrum
commented
Jul 12, 2018
I don't believe nightly builds exist but you can use https://crates.io/crates/rustup-toolchain-install-master with the |
…crum Improve verify_llvm_ir config option LLVM IR verification has been disabled by default in rust-lang#51230. However, the implementation doesn't quite match what was discussed in the discussion. This patch implements two changes: * Make `verify_llvm_ir` influence the behavior of the compiled rustc binary, rather than just the rustc build system. That is, if `verify_llvm_ir=true`, even manual invocations of the built rustc will verify LLVM IR. * Enable verification of LLVM IR in CI, for non-deploy and deploy-alt builds. This is similar to how LLVM assertions are handled.
Currently -Z no-verify only controls IR verification prior to LLVM codegen, while verification is performed unconditionally both before and after linking with (Thin)LTO.
Also wondering what the sentiment is on disabling verification by default (and e.g. only enabling it on ALT builds with assertions). This does not seem terribly useful outside of rustc development and it does seem to show up in profiles (at something like 3%).
EDIT: A table showing the various configurations and what is enabled when.