-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Remove -Zfuel. #115293
Remove -Zfuel. #115293
Conversation
r? @wesleywiser (rustbot has picked a reviewer for you, use r? to override) |
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
I found it quite useful in the past for bisecting bugs (it could be declared incompatible with incremental compilation if that aspect is an issue). |
This comment has been minimized.
This comment has been minimized.
I agree we should remove it right now, primarily because it's usefulness is significantly diminished by inconsistent use. At some point in the future we should switch to more structured transformations (as opposed to writing to |
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #112775) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #115803) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #116027) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #116144) made this pull request unmergeable. Please resolve the merge conflicts. |
Similar to @tmiasko, I've also found this useful in the past. The point that this is inconsistently used is true, but wouldn't it be better to fix that than to remove it entirely? @pnkfelix suggested that attempting to use |
We now have a more reliable way to disable optimizations: |
☔ The latest upstream changes (presumably #115964) made this pull request unmergeable. Please resolve the merge conflicts. |
It is more important that the information in the rustc-dev-guide is actually up-to-date, and that "how to debug optimization" is easy and accurate, as people try to actually use it e.g. to analyze and debug their codegen problems. By holding on to this, we are advising much more inexperienced devs to try to make sense of a de facto useless option. So, do we want random passerby to try to use |
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.
r=me with a corresponding PR to adjust rustc-dev-guide
The -Zfuel can be used to bisect specific transformation that is incorrect. It makes it trivial to generate diff between working and broken MIR. To locate the source code that is being miscompiled and extract minimized test case. The -Zmir-enable-passes is no alternative for such use cases. It works perfectly fine even if not every single MIR optimizations uses it - just run bisection, dump MIR at the boundary, and diff between those. If for some reason the current inconsistent use is a deal breaker for others, I can prepare a pull request that will incorporate it directly into a pass manager. I don't think we should remove it without a proper replacement. |
|
☔ The latest upstream changes (presumably #128959) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #129261) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #129691) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #129777) made this pull request unmergeable. Please resolve the merge conflicts. |
It will be good to get this merged. I have some follow-up cleanups that rely on |
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.
It will be good to get this merged as well. I don’t use -Zfuel
, and the reliability of this option still depends on whether we remember to call consider_optimizing
.
|
🧐 |
@bors r=wesleywiser,DianQK |
@bors r=wesleywiser,DianQK |
…mpiler-errors Rollup of 8 pull requests Successful merges: - rust-lang#115293 (Remove -Zfuel.) - rust-lang#132605 (CI: increase timeout from 4h to 6h) - rust-lang#133304 (Revert diagnostics hack to fix ICE 132920) - rust-lang#133402 (Constify `Drop` and `Destruct`) - rust-lang#133458 (Fix `Result` and `Option` not getting a jump to def link generated) - rust-lang#133471 (gce: fix typing_mode mismatch) - rust-lang#133475 (`MaybeStorage` improvements) - rust-lang#133513 (Only ignore windows-gnu in avr-jmp-offset) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#115293 - cjgillot:no-fuel, r=wesleywiser,DianQK Remove -Zfuel. I'm not sure this feature is used. I only found 2 references in a google search, both referring to its introduction. Meanwhile, it's a global mutable state, untracked by incremental compilation, so incompatible with it.
I'm not sure this feature is used. I only found 2 references in a google search, both referring to its introduction.
Meanwhile, it's a global mutable state, untracked by incremental compilation, so incompatible with it.