Skip to content

Commit d3d28a4

Browse files
committed
Auto merge of #65927 - eddyb:eval-always-considered-harmful, r=michaelwoerister
Don't use eval_always for miri queries used from codegen. This should fix the [massive incremental perf regression](https://perf.rust-lang.org/compare.html?start=95f437b3cfb2fec966d7eaf69d7c2e36f9c274d1&end=9285d401a6070094747465962bc49969b93e14c5&stat=instructions:u) introduced in #65664. It seems that `eval_always` was mistakenly(?) added to `const_field` and then it ended up on `const_caller_location` (which is used much more often than `const_field` is). r? @michaelwoerister cc @oli-obk @nnethercote
2 parents eb5ef81 + beb06ae commit d3d28a4

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

Diff for: src/librustc/query/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -462,13 +462,11 @@ rustc_queries! {
462462
query const_field(
463463
key: ty::ParamEnvAnd<'tcx, (&'tcx ty::Const<'tcx>, mir::Field)>
464464
) -> &'tcx ty::Const<'tcx> {
465-
eval_always
466465
no_force
467466
desc { "extract field of const" }
468467
}
469468

470469
query const_caller_location(key: (syntax_pos::Symbol, u32, u32)) -> &'tcx ty::Const<'tcx> {
471-
eval_always
472470
no_force
473471
desc { "get a &core::panic::Location referring to a span" }
474472
}

0 commit comments

Comments
 (0)