-
Notifications
You must be signed in to change notification settings - Fork 69
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
-Zmir-opt-level Reform #319
Comments
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed. |
@rustbot second |
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed. |
This comment has been minimized.
This comment has been minimized.
…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
…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`
-Zmir-opt-level
ReformSummary
Change the
-Zmir-opt-level
unstable flag to have the following possible values and associated behaviors:0
- MIR optimizations are disabled.1
- Some MIR optimizations are enabled.-Zmir-opt-level
is not specified.2
- Many (most?) MIR optimizations are enabled.3
- All non-experimental MIR optimizations are enabled.mir-opt-level=2
, optimizations would not be required to maintain the debug-ability of programs.In addition, a new permanently unstable compiler flag is added:
-Zexperimental-mir-optimizations
. MIR optimizations that are still being developed or are currently too buggy to be enabled are gated under this flag which allows them to still be maintained in-tree and participate in themir-opt
testing framework.Rationale
Currently,
-Zmir-opt-level
is kind of a mess.-Zmir-opt-level=0
disables MIR optimizations but that wasn't always the case.-Zmir-opt-level=1
runs some of the MIR optimizations. (This is the current default)-Zmir-opt-level=2
has broken MIR optimizations.-Zmir-opt-level=3
has slow MIR optimizaitons.By changing
-Zmir-opt-level
so that we do not run experimental/broken MIR optimizations, we can eventually allow--release
builds to usemir-opt-level=2
and even potentially stablize the flag, allowingstable
users to opt-in tomir-opt-level=3
for cases where run-time performance is the highest priority. This MCP does not propose doing that at this time, but notes that it would be reasonable to consider those possibilities in the future if this MCP were accepted.Mentors or Reviewers
@oli-obk has volunteered to review.
Process
The main points of the Major Change Process is as follows:
@rustbot second
.-C flag
, then full team check-off is required.@rfcbot fcp merge
on either the MCP or the PR.You can read more about Major Change Proposals on forge.
Comments
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.
The text was updated successfully, but these errors were encountered: