Uh oh!
There was an error while loading. Please reload this page.
[mir-opt] Introduce a new flag to enable experimental/unsound mir opts - #76899
Conversation
I would personally prefer
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
@oli-obk I tried to keep our MIR opt tests' output as close to the current ones as possible. Some of these passes run after copy-prop so the effects of it being disabled by default (even under mir-opt-level=2) show up as changes in the tests. If you think we should not add this flag to those tests and accept the changes instead, I'd be happy to do so. |
oli-obk
commented
Sep 19, 2020
Maybe remove the flag again in a separate commit so we keep the changes separate? |
oli-obk
commented
Sep 19, 2020
With that and the flag renamed to |
RalfJung
commented
Sep 19, 2020
via email
// FIXME(76740): This opt is buggy and can cause unsoundness. Is "opt" short for option or optimization? It is used for option in the next line, so probably better to spell it out here. |
wesleywiser
commented
Sep 19, 2020
@RalfJung I remember you felt quite strongly the option name should include "unsound". Does |
tmiasko
commented
Sep 19, 2020
Is this option intended only for unsound passes or also that are buggy in other ways e.g., ICE? If the latter I would also include inlining pass. Recently when I evaluated mir-opt-level=2 on a different crates, rustc generally ICEd due to normalization issues in inliner or other issues exposed indirectly by inlining. The attempt to enable inlining in #75495 didn't fare any better. |
wesleywiser
commented
Sep 19, 2020
Originally, I was thinking this flag could handle both but now I'm thinking we should probably have two. The optimizations that have bugs which result in unsoundness are far worse than the ones that "just" ICE the compiler. |
bors
commented
Sep 20, 2020
☔ The latest upstream changes (presumably #72632) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels: |
RalfJung
commented
Sep 20, 2020
Yes I like that name. :) |
4f4cc60 to
3498511Comparewesleywiser
commented
Sep 21, 2020
@bors r=oli-obk |
bors
commented
Sep 21, 2020
📌 Commit 3498511 has been approved by |
…r_opts_flag, r=oli-obk [mir-opt] Introduce a new flag to enable experimental/unsound mir opts This implements part of rust-lang/compiler-team#319. The exact name of this flag was not decided as part of that MCP and some people expressed that it should include "unsound" in some way. I've chosen to use `enable-experimental-unsound-mir-opts` as the name. While long, I don't think that matters too much as really it will only be used by some mir-opt tests. If you object or have a better name, please leave a comment! r? @oli-obk cc @rust-lang/wg-mir-opt @RalfJung
Dylan-DPC-zz
commented
Sep 23, 2020
3498511 to
2c5f061Comparewesleywiser
commented
Sep 25, 2020
Rebased and resolved the failing test from the rollup. @bors r=oli-obk |
bors
commented
Sep 25, 2020
📌 Commit 2c5f061d187b346c7f9e229a53be41723164ec30 has been approved by |
bors
commented
Sep 25, 2020
☔ The latest upstream changes (presumably #76844) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels: |
2c5f061 to
c653af8Comparewesleywiser
commented
Sep 28, 2020
Rebased @bors r=oli-obk |
bors
commented
Sep 28, 2020
📌 Commit c653af8 has been approved by |
bors
commented
Sep 28, 2020
bors
commented
Sep 28, 2020
☀️ Test successful - checks-actions, checks-azure |
This implements part of rust-lang/compiler-team#319. The exact name of this flag was not decided as part of that MCP and some people expressed that it should include "unsound" in some way.
I've chosen to use
enable-experimental-unsound-mir-optsas the name. While long, I don't think that matters too much as really it will only be used by some mir-opt tests. If you object or have a better name, please leave a comment!r? @oli-obk
cc @rust-lang/wg-mir-opt @RalfJung