klensy
31d99836bf
QueryContext: rename try_collect_active_jobs -> collect_active_jobs and change it's return type from Option<QueryMap> to QueryMap
...
As there currently always Some(...) inside
2023-11-27 18:13:15 +03:00
Vadim Petrochenkov
2c23386344
rustc: Make def_kind
mandatory for all DefId
s
2023-11-25 14:49:43 +03:00
Nilstrieb
21a870515b
Fix clippy::needless_borrow
in the compiler
...
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`.
Then I had to remove a few unnecessary parens and muts that were exposed
now.
2023-11-21 20:13:40 +01:00
Jubilee
975d042d4c
Rollup merge of #116534 - cjgillot:no-dep-tasks, r=davidtwco
...
Remove -Zdep-tasks.
This option is not useful any more, we can use `tracing` and `RUSTC_LOG` to debug the dep-graph.
2023-10-28 01:07:35 -07:00
Michael Goulet
1836c1fbbd
Stash and cancel cycle errors for auto trait leakage in opaques
2023-10-26 17:58:02 +00:00
Camille GILLOT
8531ebfc95
Remove useless debugging.
2023-10-08 12:24:20 +00:00
John Kåre Alsaker
1806efe7f2
Move DepKind
to rustc_query_system
and define it as u16
2023-09-21 17:06:14 +02:00
John Kåre Alsaker
f742d88326
Remove verbose_generic_activity_with_arg
2023-09-10 17:47:16 +02:00
Michael Goulet
e7b3c94b0e
Pass ErrorGuaranteed to cycle error
2023-08-27 22:03:00 +00:00
Matthias Krüger
adf759bf6a
fix couple of clippy findings:
...
filter_map_identity
iter_kv_map
needless_question_mark
redundant_at_rest_pattern
filter_next
derivable_impls
2023-07-23 10:50:14 +02:00
Oli Scherer
b0142f603d
Avoid calling queries during query stack printing
2023-06-27 16:12:07 +02:00
Oli Scherer
81e37743a5
Make queries traceable again
2023-06-21 10:25:25 +00:00
John Kåre Alsaker
aa5d43647b
Add comment
2023-05-21 11:25:07 +02:00
John Kåre Alsaker
9c978b955e
Replace QueryStruct
with arrays local to rustc_query_impl
2023-05-21 03:12:56 +02:00
John Kåre Alsaker
9e755d98cc
Merge some query impl modules into one
2023-05-19 01:38:27 +02:00
John Kåre Alsaker
f6c6d10443
Merge query property modules into one
2023-05-18 09:45:12 +02:00
bors
77c836e1ae
Auto merge of #108938 - chenyukang:yukang/fix-107910-shorten-ice, r=cjgillot
...
Shorten backtraces for queries in ICEs
r? `@jyn514`
Fixes #107910
2023-05-18 04:21:15 +00:00
yukang
c3394b3eaa
Fix #107910 , Shorten backtraces in ICEs
2023-05-17 17:56:26 +08:00
John Kåre Alsaker
54b582a0e8
Finish move of query.rs
2023-05-17 01:57:21 +02:00
John Kåre Alsaker
882a9684f9
Specialize query execution for incremental and non-incremental
2023-05-14 21:53:05 +02:00
John Kåre Alsaker
2fe28ae0a4
Use dynamic dispatch for queries
2023-04-30 09:48:47 +02:00
John Kåre Alsaker
66d85438ca
Remove QueryEngine trait
2023-04-26 07:46:13 +02:00
Ben Kimock
0445fbdd83
Store hashes in special types so they aren't accidentally encoded as numbers
2023-04-18 10:52:47 -04:00
John Kåre Alsaker
6d99dd9189
Address comments
2023-04-06 08:25:53 +02:00
John Kåre Alsaker
36b4199a8e
Don't rely on Debug
impl for Erased
2023-04-06 08:25:53 +02:00
John Kåre Alsaker
785459d630
Erase query cache values
2023-04-06 08:25:52 +02:00
Michael Goulet
2eb1c08e43
Use local key in providers
2023-03-21 15:38:51 +00:00
Camille GILLOT
1ca103a168
Ensure value is on the on-disk cache before returning.
2023-03-11 22:41:01 +00:00
John Kåre Alsaker
d1c8430a34
Derive Default for query structs
2023-02-26 23:45:29 +01:00
John Kåre Alsaker
3b26d71e04
Avoid implementing Debug for QueryConfig
2023-02-26 23:35:52 +01:00
John Kåre Alsaker
3fd7c4a17d
Make rustc_query_system
take QueryConfig
by instance.
2023-02-26 23:35:47 +01:00
John Kåre Alsaker
a049550c45
Move ensure_sufficient_stack
to try_execute_query
callers
2023-02-25 06:11:01 +01:00
bors
b5c8c329a7
Auto merge of #108058 - Zoxc:query-ctxtx-byval, r=cjgillot
...
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-17 08:23:53 +00:00
John Kåre Alsaker
067bf2ac13
Move provider fields back to rustc_query_impl
2023-02-16 14:55:05 +01:00
John Kåre Alsaker
a51a20531d
Factor query arena allocation out from query caches
2023-02-16 14:54:53 +01:00
John Kåre Alsaker
b3a4fe7d4e
Pass DepContext
and QueryContext
by value when practical
2023-02-14 17:21:18 +01:00
Nicholas Nethercote
f7b3e39502
Simplify tls::enter_context
.
2023-02-09 15:25:45 +11:00
Michael Goulet
64f5293956
Don't cause a cycle when formatting query description that references a FnDef
2023-02-02 05:49:07 +00:00
nils
fd7a159710
Fix uninlined_format_args
for some compiler crates
...
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-05 19:01:12 +01:00
Nilstrieb
9fe4efe115
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-02 20:22:19 +01:00
gimbles
f8b30084ac
Use DepKind instead of &str
2022-12-23 18:39:49 +05:30
Camille GILLOT
9f2c6b0b09
Sanity check computed value for feeable queries.
2022-11-29 18:42:23 +00:00
Camille GILLOT
7c45772bc9
Make verbose query description more useful.
2022-11-29 18:36:53 +00:00
bors
341d8b8a2c
Auto merge of #103808 - cjgillot:vec-cache, r=TaKO8Ki
...
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-24 06:32:23 +00:00
Nilstrieb
36be251a35
Merge QueryDescription
into QueryConfig
...
`QueryDescription` has gone through a lot of refactoring and doesn't
make sense anymore.
2022-11-05 16:24:13 +01:00
Camille GILLOT
ade5cffc2b
Move keys module.
2022-11-01 17:02:51 +00:00
nils
24ce4cfa20
Remove the describe
method from the QueryDescription
trait
...
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-14 22:35:56 +02:00
Nilstrieb
167b3bd3b2
Get rid of rustc_query_description!
...
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-14 22:35:56 +02:00
Cameron Steffen
ff940db666
Rewrite representability
2022-10-07 09:33:46 -05:00
bors
3288d3a305
Auto merge of #101785 - jyn514:query-struct-fn-ptrs, r=cjgillot
...
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-26 00:17:59 +00:00