summary refs log tree commit diff
path: root/compiler/rustc_query_system/src/query
AgeCommit message (Collapse)AuthorLines
2023-02-28Fix a race in the query systemJohn Kåre Alsaker-4/+5
2023-02-25Don't inline try_execute_queryJohn Kåre Alsaker-0/+1
2023-02-25Add inlining attributes for query system functionsJohn Kåre Alsaker-0/+4
2023-02-25Move `ensure_sufficient_stack` to `try_execute_query` callersJohn Kåre Alsaker-15/+8
2023-02-25Reduce calls to `current_query_job`John Kåre Alsaker-4/+4
2023-02-24Rollup merge of #108169 - Zoxc:query-key-copy, r=cjgillotDylan DPC-17/+18
Make query keys `Copy` This regressed compiler performance locally, so I'm curious what perf will say about it. <table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th></tr><tr><td>🟣 <b>clap</b>:check</td><td align="right">1.7566s</td><td align="right">1.7657s</td><td align="right"> 0.52%</td></tr><tr><td>🟣 <b>hyper</b>:check</td><td align="right">0.2572s</td><td align="right">0.2578s</td><td align="right"> 0.20%</td></tr><tr><td>🟣 <b>regex</b>:check</td><td align="right">0.9863s</td><td align="right">0.9900s</td><td align="right"> 0.37%</td></tr><tr><td>🟣 <b>syn</b>:check</td><td align="right">1.6018s</td><td align="right">1.6073s</td><td align="right"> 0.34%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check</td><td align="right">6.2493s</td><td align="right">6.2920s</td><td align="right"> 0.68%</td></tr><tr><td>Total</td><td align="right">10.8512s</td><td align="right">10.9127s</td><td align="right"> 0.57%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">1.0042s</td><td align="right"> 0.42%</td></tr></table>
2023-02-21Make query keys `Copy`John Kåre Alsaker-17/+18
2023-02-18Auto merge of #107542 - ↵bors-1/+18
compiler-errors:param-envs-with-inference-vars-are-cursed, r=jackh726 Don't call `with_reveal_all_normalized` in const-eval when `param_env` has inference vars in it **what:** This slightly shifts the order of operations from an existing hack: https://github.com/rust-lang/rust/blob/5b6ed253c42a69b93e7447fb0874a89ab6bc1cfb/compiler/rustc_middle/src/ty/consts/kind.rs#L225-L230 in order to avoid calling a tcx query (`TyCtxt::reveal_opaque_types_in_bounds`, via `ParamEnv::with_reveal_all_normalized`) when a param-env has inference variables in it. **why:** This allows us to enable fingerprinting of query keys/values outside of incr-comp in deubg mode, to make sure we catch other places where we're passing infer vars and other bad things into query keys. Currently that (bbf33836b9adfe4328aefa108c421e670a3923b7) crashes because we introduce inference vars into a param-env in the blanket-impl finder in rustdoc :sweat: https://github.com/rust-lang/rust/blob/5b6ed253c42a69b93e7447fb0874a89ab6bc1cfb/src/librustdoc/clean/blanket_impl.rs#L43 See the CI failure here: https://github.com/rust-lang/rust/actions/runs/4058194838/jobs/6984834619
2023-02-17Don't allow evaluating queries that were fed in a previous compiler runOli Scherer-19/+6
2023-02-17Auto merge of #108058 - Zoxc:query-ctxtx-byval, r=cjgillotbors-8/+8
Pass `DepContext` and `QueryContext` by value when practical This removes some indirections for a minor performance improvement. <table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th></tr><tr><td>🟣 <b>clap</b>:check</td><td align="right">1.8294s</td><td align="right">1.8255s</td><td align="right"> -0.21%</td></tr><tr><td>🟣 <b>hyper</b>:check</td><td align="right">0.2667s</td><td align="right">0.2669s</td><td align="right"> 0.07%</td></tr><tr><td>🟣 <b>regex</b>:check</td><td align="right">1.0080s</td><td align="right">1.0063s</td><td align="right"> -0.17%</td></tr><tr><td>🟣 <b>syn</b>:check</td><td align="right">1.6335s</td><td align="right">1.6295s</td><td align="right"> -0.24%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check</td><td align="right">6.3633s</td><td align="right">6.3344s</td><td align="right"> -0.45%</td></tr><tr><td>Total</td><td align="right">11.1009s</td><td align="right">11.0627s</td><td align="right"> -0.34%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9980s</td><td align="right"> -0.20%</td></tr></table>
2023-02-16Remove parallel compiler fixJohn Kåre Alsaker-4/+1
2023-02-16Move provider fields back to rustc_query_implJohn Kåre Alsaker-8/+6
2023-02-16Factor query arena allocation out from query cachesJohn Kåre Alsaker-196/+33
2023-02-15don't clone types that are copyMatthias Krüger-3/+3
2023-02-14Pass `DepContext` and `QueryContext` by value when practicalJohn Kåre Alsaker-8/+8
2023-02-11Create a single value cache for the () query keyJohn Kåre Alsaker-2/+48
2023-02-08Auto merge of #107644 - Zoxc:query-cache-tweak, r=cjgillotbors-37/+4
Remove QueryStorage::store_nocache This method was added in https://github.com/rust-lang/rust/pull/70674 but it doesn't seem to serve any purpose.
2023-02-07Remove QueryStorage::store_nocacheJohn Kåre Alsaker-37/+4
2023-02-06Make an optimal cold path for query_cache_hitJohn Kåre Alsaker-12/+4
2023-02-06Don't inline query_cache_hit to reduce code size of the query hot path.John Kåre Alsaker-1/+3
2023-02-04Support parallel compiler.Camille GILLOT-3/+3
2023-02-04Remove `OnHit` callback from query caches.Camille GILLOT-84/+45
This is not useful now that query results are `Copy`.
2023-01-31Fingerprint even when incr comp is disabled in debug modeMichael Goulet-1/+18
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-2/+2
2023-01-05Fix `uninlined_format_args` for some compiler cratesnils-7/+5
Convert all the crates that have had their diagnostic migration completed (except save_analysis because that will be deleted soon and apfloat because of the licensing problem).
2023-01-02Abolish `QueryVTable` in favour of more assoc items on `QueryConfig`Nilstrieb-95/+73
This may introduce additional mono _but_ may help const fold things better and especially may help not constructing a `QueryVTable` anymore which is cheap but not free.
2022-12-24Rollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholkMatthias Krüger-2/+2
rustc: Remove needless lifetimes
2022-12-23Auto merge of #105550 - gimbles:master, r=Nilstriebbors-87/+111
Use `DepKind` instead of `&'static str` in `QueryStackFrame` `@rustbot` author Fixes #105168
2022-12-23Use DepKind instead of &strgimbles-87/+111
2022-12-20rustc: Remove needless lifetimesJeremy Stucki-2/+2
2022-12-10compiler: remove unnecessary imports and qualified pathsKaDiWa-4/+3
2022-11-29Sanity check computed value for feeable queries.Camille GILLOT-3/+20
2022-11-29Expand hash check.Camille GILLOT-14/+18
2022-11-29Sanity check fingerprints in the dep-graph.Camille GILLOT-0/+4
2022-11-24Auto merge of #103808 - cjgillot:vec-cache, r=TaKO8Kibors-12/+193
Use an IndexVec to cache queries with index-like key Revival of an old idea. Let's see if it has more effect. r? `@ghost`
2022-11-06Rename `Ctxt` and `CTX` to `Tcx` and `Qcx`Nilstrieb-74/+74
This makes it consistent and clear which context is used.
2022-11-06Rename `tcx` to `qcx` when it's a `QueryContext`Nilstrieb-75/+75
2022-11-06Improve tracing loggingNilstrieb-2/+2
2022-11-06Rename `incremental_verify_ich_cold` to `incremental_verify_ich_failed`Nilstrieb-8/+12
2022-11-05Merge `QueryDescription` into `QueryConfig`Nilstrieb-27/+27
`QueryDescription` has gone through a lot of refactoring and doesn't make sense anymore.
2022-11-01Use Key impl to select cache.Camille GILLOT-1/+27
2022-11-01Use VecCache for LocalDefId.Camille GILLOT-1/+175
2022-11-01Remove CacheSelector.Camille GILLOT-20/+1
2022-10-14Remove the `describe` method from the `QueryDescription` traitnils-2/+0
It was called directly already, but now it's even more useless since it just forwards to the free function. Call it directly.
2022-10-07Rewrite representabilityCameron Steffen-9/+17
2022-09-21FIX - adopt new Diagnostic naming in newly migrated modulesJhonny Bill Mena-1/+1
FIX - ambiguous Diagnostic link in docs UPDATE - rename diagnostic_items to IntoDiagnostic and AddToDiagnostic [Gardening] FIX - formatting via `x fmt` FIX - rebase conflicts. NOTE: Confirm wheather or not we want to handle TargetDataLayoutErrorsWrapper this way DELETE - unneeded allow attributes in Handler method FIX - broken test FIX - Rebase conflict UPDATE - rename residual _SessionDiagnostic and fix LintDiag link
2022-09-21UPDATE - rename DiagnosticHandler trait to IntoDiagnosticJhonny Bill Mena-1/+1
2022-09-21UPDATE - move SessionDiagnostic from rustc_session to rustc_errorsJhonny Bill Mena-2/+4
2022-09-15correct span, add help message and add UI test when query depth overflowsSparrowLii-19/+3
2022-09-15add note for `layout_of` when query depth overflowsSparrowLii-3/+36