about summary refs log tree commit diff
path: root/compiler/rustc_query_system/src
AgeCommit message (Collapse)AuthorLines
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-11/+11
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-16Auto merge of #107833 - Zoxc:arena-query-clean, r=cjgillotbors-198/+30
Factor query arena allocation out from query caches This moves the logic for arena allocation out from the query caches into conditional code in the query system. The specialized arena caches are removed. A new `QuerySystem` type is added in `rustc_middle` which contains the arenas, providers and query caches. Performance seems to be slightly regressed: <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.8053s</td><td align="right">1.8109s</td><td align="right"> 0.31%</td></tr><tr><td>🟣 <b>hyper</b>:check</td><td align="right">0.2600s</td><td align="right">0.2597s</td><td align="right"> -0.10%</td></tr><tr><td>🟣 <b>regex</b>:check</td><td align="right">0.9973s</td><td align="right">1.0006s</td><td align="right"> 0.34%</td></tr><tr><td>🟣 <b>syn</b>:check</td><td align="right">1.6048s</td><td align="right">1.6051s</td><td align="right"> 0.02%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check</td><td align="right">6.2992s</td><td align="right">6.3159s</td><td align="right"> 0.26%</td></tr><tr><td>Total</td><td align="right">10.9664s</td><td align="right">10.9922s</td><td align="right"> 0.23%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">1.0017s</td><td align="right"> 0.17%</td></tr></table> Incremental performance is a bit worse: <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:initial</td><td align="right">2.2103s</td><td align="right">2.2247s</td><td align="right"> 0.65%</td></tr><tr><td>🟣 <b>hyper</b>:check:initial</td><td align="right">0.3335s</td><td align="right">0.3349s</td><td align="right"> 0.41%</td></tr><tr><td>🟣 <b>regex</b>:check:initial</td><td align="right">1.2597s</td><td align="right">1.2650s</td><td align="right"> 0.42%</td></tr><tr><td>🟣 <b>syn</b>:check:initial</td><td align="right">2.0521s</td><td align="right">2.0613s</td><td align="right"> 0.45%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check:initial</td><td align="right">7.8275s</td><td align="right">7.8583s</td><td align="right"> 0.39%</td></tr><tr><td>Total</td><td align="right">13.6832s</td><td align="right">13.7442s</td><td align="right"> 0.45%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">1.0046s</td><td align="right"> 0.46%</td></tr></table> It does seem like LLVM optimizers struggle a bit with the current state of the query system. Based on top of https://github.com/rust-lang/rust/pull/107782 and https://github.com/rust-lang/rust/pull/107802. r? `@cjgillot`
2023-02-16`if $c:expr { Some($r:expr) } else { None }` =>> `$c.then(|| $r)`Maybe Waffle-2/+1
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-11/+11
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-13/+5
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/+19
2023-01-28Use OnDrop.Camille GILLOT-39/+32
2023-01-28Attempt to reduce perf impact.Camille GILLOT-10/+17
2023-01-28Print a backtrace when query forcing fails.Camille GILLOT-11/+45
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-9/+9
2023-01-05Fix `uninlined_format_args` for some compiler cratesnils-31/+22
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-02Auto merge of #106307 - Nilstrieb:dynamic->static, r=cjgillotbors-95/+73
Abolish `QueryVTable` in favour of more assoc items on `QueryConfig` 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.
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-25Ignore span references from diagnostics.Camille GILLOT-2/+4
The diagnostics are replayed at the correct place anyway.
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-92/+116
Use `DepKind` instead of `&'static str` in `QueryStackFrame` `@rustbot` author Fixes #105168
2022-12-23Use DepKind instead of &strgimbles-92/+116
2022-12-20rustc: Remove needless lifetimesJeremy Stucki-2/+2
2022-12-18A few small cleanups for `newtype_index`Nilstrieb-4/+3
Remove the `..` from the body, only a few invocations used it and it's inconsistent with rust syntax. Use `;` instead of `,` between consts. As the Rust syntax gods inteded.
2022-12-18Make `#[max]` an attribute in `newtype_index`Nilstrieb-1/+1
2022-12-14Auto merge of #105233 - mejrs:always_eager, r=estebankbors-1/+1
Always evaluate vecs of subdiagnostics eagerly See https://rust-lang.zulipchat.com/#narrow/stream/336883-i18n/topic/.23100717.20lists!/near/310186705 for context
2022-12-10compiler: remove unnecessary imports and qualified pathsKaDiWa-6/+4
2022-12-09Fold `Definitions` into the untracked dataOli Scherer-5/+3
2022-12-09Move the untracked cstore and source_span into a structOli Scherer-14/+6
2022-12-05feed resolver_for_lowering instead of storing it in a fieldOli Scherer-6/+9
2022-12-04Always evaluate vecs of subdiagnostics eagerlymejrs-1/+1
2022-12-01Fill in `def_span` when creating def ids.Oli Scherer-1/+2
This makes sure that ICEing because of def ids created outside of ast lowering will be able to produce a query backtrace and not cause a double panic because of trying to call the `def_span` query
2022-11-29Sanity check computed value for feeable queries.Camille GILLOT-3/+20
2022-11-29Expand hash check.Camille GILLOT-21/+28
2022-11-29Allow to set a query's result as a side effect.Camille GILLOT-0/+82
2022-11-29Sanity check fingerprints in the dep-graph.Camille GILLOT-19/+39
2022-11-27Prefer doc comments over `//`-comments in compilerMaybe Waffle-12/+12
2022-11-24Rollup merge of #104780 - BoxyUwU:error_reported_not_be_bad, r=oli-obkMatthias Krüger-1/+1
make `error_reported` check for delayed bugs Fixes #104768 `error_reported()` was only checking if there were errors emitted, not for `delay_bug`s which can also be a source of `ErrorGuaranteed`. I assume the same is true of `lint_err_count` but i dont know
2022-11-24make `error_reported` check for delayed bugsBoxy-1/+1
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-11Hash spans when interning.Camille GILLOT-37/+2
2022-11-06Rename `Ctxt` and `CTX` to `Tcx` and `Qcx`Nilstrieb-109/+109
This makes it consistent and clear which context is used.
2022-11-06Rename `tcx` to `qcx` when it's a `QueryContext`Nilstrieb-94/+94
2022-11-06Improve tracing loggingNilstrieb-43/+17