-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
regression: cycle in MIR opts #88972
Labels
I-cycle
Issue: A query cycle occurred while none was expected
P-high
High priority
regression-from-stable-to-beta
Performance or correctness regression from stable to beta.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone
Comments
Mark-Simulacrum
added
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
regression-from-stable-to-beta
Performance or correctness regression from stable to beta.
labels
Sep 15, 2021
rustbot
added
the
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
label
Sep 15, 2021
diff --git a/compiler/rustc_mir_transform/src/remove_zsts.rs b/compiler/rustc_mir_transform/src/remove_zsts.rs
index 25e3c52132c..d93ffa38c69 100644
--- a/compiler/rustc_mir_transform/src/remove_zsts.rs
+++ b/compiler/rustc_mir_transform/src/remove_zsts.rs
@@ -9,6 +9,10 @@
impl<'tcx> MirPass<'tcx> for RemoveZsts {
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
+ // Avoid query cycles (generators require optimized MIR for layout).
+ if tcx.type_of(body.source.def_id()).is_generator() {
+ return;
+ }
let param_env = tcx.param_env(body.source.def_id());
let (basic_blocks, local_decls) = body.basic_blocks_and_local_decls_mut();
for block in basic_blocks.iter_mut() { |
Fixed by #88979. Sorry for taking over, but since I started looking into it already. |
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
Sep 16, 2021
…s, r=oli-obk Disable RemoveZsts in generators to avoid query cycles Querying layout of a generator requires its optimized MIR. Thus computing layout during MIR optimization of a generator might create a query cycle. Disable RemoveZsts in generators to avoid the issue (similar approach is used in ConstProp transform already). Fixes rust-lang#88972.
Still needs a backport |
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-high |
rustbot
added
P-high
High priority
and removed
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
labels
Sep 22, 2021
ehuss
pushed a commit
to ehuss/rust
that referenced
this issue
Oct 4, 2021
… r=oli-obk Disable RemoveZsts in generators to avoid query cycles Querying layout of a generator requires its optimized MIR. Thus computing layout during MIR optimization of a generator might create a query cycle. Disable RemoveZsts in generators to avoid the issue (similar approach is used in ConstProp transform already). Fixes rust-lang#88972.
fixed by #89527 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
I-cycle
Issue: A query cycle occurred while none was expected
P-high
High priority
regression-from-stable-to-beta
Performance or correctness regression from stable to beta.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Found by 1.56 crater -- https://crater-reports.s3.amazonaws.com/beta-1.56-2/beta-2021-09-12/gh/jkarneges.rust-async-bench/log.txt
cc @oli-obk
The text was updated successfully, but these errors were encountered: