about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src/plumbing.rs
AgeCommit message (Collapse)AuthorLines
2023-08-27Pass ErrorGuaranteed to cycle errorMichael Goulet-2/+2
2023-07-23fix couple of clippy findings:Matthias Krüger-1/+1
filter_map_identity iter_kv_map needless_question_mark redundant_at_rest_pattern filter_next derivable_impls
2023-06-27Avoid calling queries during query stack printingOli Scherer-3/+3
2023-06-21Make queries traceable againOli Scherer-1/+9
2023-05-21Add commentJohn Kåre Alsaker-0/+2
2023-05-21Replace `QueryStruct` with arrays local to `rustc_query_impl`John Kåre Alsaker-64/+66
2023-05-19Merge some query impl modules into oneJohn Kåre Alsaker-143/+125
2023-05-18Merge query property modules into oneJohn Kåre Alsaker-22/+23
2023-05-18Auto merge of #108938 - chenyukang:yukang/fix-107910-shorten-ice, r=cjgillotbors-35/+58
Shorten backtraces for queries in ICEs r? `@jyn514` Fixes #107910
2023-05-17Fix #107910, Shorten backtraces in ICEsyukang-35/+58
2023-05-17Finish move of query.rsJohn Kåre Alsaker-2/+1
2023-05-14Specialize query execution for incremental and non-incrementalJohn Kåre Alsaker-5/+33
2023-04-30Use dynamic dispatch for queriesJohn Kåre Alsaker-143/+105
2023-04-26Remove QueryEngine traitJohn Kåre Alsaker-176/+127
2023-04-18Store hashes in special types so they aren't accidentally encoded as numbersBen Kimock-2/+2
2023-04-06Address commentsJohn Kåre Alsaker-12/+5
2023-04-06Don't rely on `Debug` impl for `Erased`John Kåre Alsaker-1/+6
2023-04-06Erase query cache valuesJohn Kåre Alsaker-12/+38
2023-03-21Use local key in providersMichael Goulet-9/+9
2023-03-11Ensure value is on the on-disk cache before returning.Camille GILLOT-0/+23
2023-02-26Derive Default for query structsJohn Kåre Alsaker-9/+1
2023-02-26Avoid implementing Debug for QueryConfigJohn Kåre Alsaker-1/+1
2023-02-26Make `rustc_query_system` take `QueryConfig` by instance.John Kåre Alsaker-33/+87
2023-02-25Move `ensure_sufficient_stack` to `try_execute_query` callersJohn Kåre Alsaker-3/+1
2023-02-17Auto merge of #108058 - Zoxc:query-ctxtx-byval, r=cjgillotbors-13/+13
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-16Move provider fields back to rustc_query_implJohn Kåre Alsaker-9/+16
2023-02-16Factor query arena allocation out from query cachesJohn Kåre Alsaker-29/+36
2023-02-14Pass `DepContext` and `QueryContext` by value when practicalJohn Kåre Alsaker-13/+13
2023-02-09Simplify `tls::enter_context`.Nicholas Nethercote-1/+1
2023-02-02Don't cause a cycle when formatting query description that references a FnDefMichael Goulet-5/+8
2023-01-05Fix `uninlined_format_args` for some compiler cratesnils-1/+1
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-18/+22
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-23Use DepKind instead of &strgimbles-11/+13
2022-11-29Sanity check computed value for feeable queries.Camille GILLOT-0/+13
2022-11-29Make verbose query description more useful.Camille GILLOT-1/+1
2022-11-24Auto merge of #103808 - cjgillot:vec-cache, r=TaKO8Kibors-1/+1
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-05Merge `QueryDescription` into `QueryConfig`Nilstrieb-16/+13
`QueryDescription` has gone through a lot of refactoring and doesn't make sense anymore.
2022-11-01Move keys module.Camille GILLOT-1/+1
2022-10-14Remove the `describe` method from the `QueryDescription` traitnils-8/+4
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-14Get rid of `rustc_query_description!`Nilstrieb-1/+8
Queries can provide an arbitrary expression for their description and their caching behavior. Before, these expressions where stored in a `rustc_query_description` macro emitted by the `rustc_queries` macro, and then used in `rustc_query_impl` to fill out the methods for the `QueryDescription` trait. Instead, we now emit two new modules from `rustc_queries` containing the functions with the expressions. `rustc_query_impl` calls these functions now instead of invoking the macro. Since we are now defining some of the functions in `rustc_middle::query`, we now need all the imports for the key types there as well.
2022-10-07Rewrite representabilityCameron Steffen-4/+4
2022-09-26Auto merge of #101785 - jyn514:query-struct-fn-ptrs, r=cjgillotbors-38/+86
Use function pointers instead of macro-unrolled loops in rustc_query_impl By making these standalone functions, we a) allow making them extensible in the future with a new `QueryStruct` b) greatly decrease the amount of code in each individual function, avoiding exponential blowup in llvm Helps with https://github.com/rust-lang/rust/issues/96524. Based on https://github.com/rust-lang/rust/pull/101173; only the last commit is relevant. r? `@cjgillot`
2022-09-25Move the `codegen_unit` debug assert from `rustc_query_system` to `query_impl`Joshua Nelson-0/+18
This allows removing a function from the `DepKind` trait.
2022-09-25Use function pointers instead of macro-unrolled loops in rustc_query_implJoshua Nelson-38/+86
By making these standalone functions, we a) allow making them extensible in the future with a new `QueryStruct` b) greatly decrease the amount of code in each individual function, avoiding exponential blowup in llvm
2022-09-17Rollup merge of #101801 - SparrowLii:query_depth_note, r=estebankMatthias Krüger-2/+27
add note for `layout_of` when query depth overflows Fixes #101747 Added `try_find_layout_root` function to add a note for `layout_of` when query depth overflows. This would make the error in #101747 look like this: ``` error: queries overflow the depth limit! | note: Query depth increased by 66 when computing layout of `core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<alloc::boxed::Box<alloc::string::String>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`! --> D:\rust-backup\parallel_rust\query_depth.rs:40:1 | 40 | fn main() { | ^^^^^^^^^ error: aborting due to previous error ``` cc ``@semicoleon``
2022-09-15Auto merge of #101173 - jyn514:simplify-macro-arguments, r=cjgillotbors-4/+16
Further simplify the macros generated by `rustc_queries` This doesn't actually move anything outside the macros, but it makes them simpler to read. - Add a new `rustc_query_names` macro. This allows a much simpler syntax for the matchers in the macros passed to it as a callback. - Convert `define_dep_nodes` and `alloc_once` to use `rustc_query_names`. This is possible because they only use the names (despite the quite complicated matchers in `define_dep_nodes`, none of the other arguments are used). - Get rid of `rustc_dep_node_append`. r? `@cjgillot`
2022-09-15correct span, add help message and add UI test when query depth overflowsSparrowLii-1/+26
2022-09-15add note for `layout_of` when query depth overflowsSparrowLii-1/+1
2022-09-14Auto merge of #101307 - jyn514:simplify-storage, r=cjgillotbors-2/+25
Simplify caching and storage for queries I highly recommend reviewing commit-by-commit; each individual commit is quite small but it can be hard to see looking at the overall diff that the behavior is the same. Each commit depends on the previous. r? `@cjgillot`
2022-09-10Rollup merge of #101635 - jyn514:queries-new-derived, r=cjgillotDylan DPC-15/+20
Move `Queries::new` out of the macro Split out from https://github.com/rust-lang/rust/pull/101178 to make sure it's not contributing to the perf impact. r? `@cjgillot`