about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-10-29 11:28:28 +0000
committerbors <bors@rust-lang.org>2019-10-29 11:28:28 +0000
commitd3d28a49209a21628fda0245b631e5fc3465be1a (patch)
tree94730029bbe8da88b9f7fdacf9113748446e4fd7
parenteb5ef813f0d6e3fe8edd3abb046a18f5b1a8cc48 (diff)
parentbeb06aed9af27fbf192d772e39ffe0421c50e02e (diff)
downloadrust-d3d28a49209a21628fda0245b631e5fc3465be1a.tar.gz
rust-d3d28a49209a21628fda0245b631e5fc3465be1a.zip
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
-rw-r--r--src/librustc/query/mod.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/librustc/query/mod.rs b/src/librustc/query/mod.rs
index f628e194748..d13b21bb772 100644
--- a/src/librustc/query/mod.rs
+++ b/src/librustc/query/mod.rs
@@ -462,13 +462,11 @@ rustc_queries! {
         query const_field(
             key: ty::ParamEnvAnd<'tcx, (&'tcx ty::Const<'tcx>, mir::Field)>
         ) -> &'tcx ty::Const<'tcx> {
-            eval_always
             no_force
             desc { "extract field of const" }
         }
 
         query const_caller_location(key: (syntax_pos::Symbol, u32, u32)) -> &'tcx ty::Const<'tcx> {
-            eval_always
             no_force
             desc { "get a &core::panic::Location referring to a span" }
         }