bors
aadd6189ad
Auto merge of #87449 - matthiaskrgr:clippyy_v2, r=nagisa
...
more clippy::complexity fixes
(also a couple of clippy::perf fixes)
2021-08-01 09:15:15 +00:00
Aaron Hill
87740bac64
Restrict field visibility
2021-07-25 20:43:27 -05:00
Aaron Hill
e6a5231238
Create QuerySideEffects
and use it for diagnostics
2021-07-25 20:27:58 -05:00
Matthias Krüger
3fd8cbb404
clippy::useless_format
2021-07-25 12:26:03 +02:00
Camille GILLOT
fd318a2f9b
Reduce amount of function pointers.
2021-05-30 15:15:22 +02:00
Camille GILLOT
f3ed997254
Move reconstruct test inwards.
2021-05-29 22:38:51 +02:00
Camille GILLOT
c95a5682f7
Remove def_path_str.
2021-05-15 10:37:30 +02:00
Camille GILLOT
eb82187b13
Make the fast path faster.
2021-05-15 10:36:37 +02:00
Camille GILLOT
c2c59ae304
Move key recovering into force_query.
2021-05-15 10:20:56 +02:00
Aaron Hill
a4c0793551
Show nicer error when an 'unstable fingerprints' error occurs
2021-05-10 17:43:51 -04:00
bors
777bb2f612
Auto merge of #84806 - Mark-Simulacrum:try-start-entry, r=cjgillot
...
Streamline try_start code
This shifts some branches around and avoids interleaving parallel and
non-parallel versions of the function too much.
2021-05-06 22:35:06 +00:00
Mark Rousskov
981135ae8e
Streamline try_start code
...
This shifts some branches around and avoids interleaving parallel and
non-parallel versions of the function too much.
2021-05-02 12:25:48 -04:00
Mark Rousskov
61fd56fdb9
Avoid generating QueryMap::extend for each key type
2021-05-01 20:13:18 -04:00
Mark Rousskov
a1d7367429
Move iter_results to dyn FnMut rather than a generic
...
This means that we're no longer generating the iteration/locking code for each
invocation site of iter_results, rather just once per query.
This is a 15% win in instruction counts when compiling the rustc_query_impl crate.
2021-04-29 17:26:46 -04:00
Camille GILLOT
df24315ddf
Adjust profiling.
2021-03-30 18:10:08 +02:00
Camille GILLOT
6bfaf3a9cb
Stream the dep-graph to a file.
2021-03-30 18:09:59 +02:00
Josh Stone
72ebebe474
Use iter::zip in compiler/
2021-03-26 09:32:31 -07:00
Aaron Hill
443cef5618
Debug-print result when an unstable fingerprint is detected
2021-03-19 21:47:57 -04:00
bors
e7e1dc158c
Auto merge of #83007 - Aaron1011:incr-verify-default, r=Mark-Simulacrum
...
Turn `-Z incremental-verify-ich` on by default
Issue #82920 showed that the kind of bugs caught by this flag have
soundness implications.
2021-03-13 17:52:22 +00:00
Aaron Hill
7d7c81a114
Always run incremental_verify_ich
when re-computing query results
...
Issue #82920 showed that the kind of bugs caught by this flag have
soundness implications.
This causes performance regressions of up to 15.2% during incremental
compilation, but this is necessary to catch miscompilations caused by
bugs in query implementations.
2021-03-13 12:00:38 -05:00
Tyson Nottingham
adcbe49b16
rustc_query_system: simplify QueryCache::iter
...
Minor cleanup to reduce a small amount of complexity and code bloat.
Reduces the number of mono items in rustc_query_impl by 15%.
2021-03-12 17:34:14 -08:00
Camille GILLOT
903f65f215
Simplify hashing.
2021-02-21 12:22:22 +01:00
Camille GILLOT
a87de890fd
Move print_query_stack to rustc_query_system.
2021-02-20 23:40:56 +01:00
Camille GILLOT
c26d965714
Move report_cycle to rustc_query_system.
...
The call to `ty::print::with_forced_impl_filename_line`
is done when constructing the description,
at the construction of the QueryStackFrame.
2021-02-20 23:36:31 +01:00
Camille GILLOT
3897395787
Move Query to rustc_query_system.
...
Rename it to QueryStackFrame and document a bit.
2021-02-20 22:53:47 +01:00
Camille GILLOT
0144d6a3b7
Do not hold query key in Query.
2021-02-20 22:53:46 +01:00
Camille GILLOT
f96e960ccf
Access the session directly from DepContext.
2021-02-20 22:53:46 +01:00
Camille GILLOT
b27266fdb2
Use a QueryContext for try_mark_green.
2021-02-19 17:51:56 +01:00
Camille GILLOT
ea3d465c95
Move try_load_from_on_disk_cache to the QueryContext.
2021-02-19 17:51:55 +01:00
Camille GILLOT
49c1b07a9e
Decouple QueryContext from DepContext.
2021-02-19 17:51:49 +01:00
Camille GILLOT
6f04883023
Remove QueryAccessors::to_dep_node.
2021-02-19 17:51:49 +01:00
Camille GILLOT
211b05aef3
Don't require a QueryContext to access the DepGraph.
2021-02-19 17:51:49 +01:00
Tomasz Miąsko
db36db2e81
Inline try_get_cached
2021-02-16 00:00:00 +00:00
Camille GILLOT
3fc8ed68e9
Check query cache before calling into the query engine.
2021-02-13 21:14:58 +01:00
Camille GILLOT
280a2866d5
Drop the cache lock earlier.
2021-02-13 21:14:58 +01:00
Camille GILLOT
15b0bc6b83
Separate the query cache from the query state.
2021-02-13 21:14:58 +01:00
Camille GILLOT
9f46259a75
Return a Result for query cache.
2021-02-13 21:14:58 +01:00
Camille GILLOT
8684e9e47d
Merge {get,ensure}_query.
2021-02-13 21:14:57 +01:00
bors
097bc6a84f
Auto merge of #81892 - jyn514:no-inline, r=cjgillot
...
[experiment] remove `#[inline]` from rustc_query_system::plumbing
These functions have a ton of generic parameters and are instantiated
over and over again. Hopefully this will reduce binary bloat and speed
up bootstrapping times.
r? `@cjgillot`
2021-02-09 18:37:33 +00:00
Mark Rousskov
f564d7abba
Switch query descriptions to just String
...
In practice we never used the borrowed variant anyway.
2021-02-08 17:20:41 -05:00
Joshua Nelson
4f77a1afc2
[experiment] remove #[inline]
from rustc_query_system::plumbing
...
These functions have a ton of generic parameters and are instantiated
over and over again. Hopefully this will reduce binary bloat and speed
up bootstrapping times.
2021-02-08 14:57:15 -05:00
Aaron Hill
056fbbf7ee
Undo assertion change
2021-01-16 21:37:53 -05:00
Aaron Hill
6417760632
Run fmt
2021-01-16 17:53:02 -05:00
Aaron Hill
93ab705655
Print result on unstable fingerprint error
2021-01-16 17:53:02 -05:00
Aaron Hill
7afb32557d
Enforce that query results implement Debug
2021-01-16 17:53:02 -05:00
Joshua Nelson
0215b3a456
Don't mark force_query_with_job
as inline(always)
...
It's rather large, and using `inline(always)` forces it to be recompiled
in each calling crate.
2021-01-08 18:38:33 -05:00
Dániel Buga
db8b86b2df
Fix typos
2020-11-21 09:06:45 +01:00
Joshua Nelson
57c6ed0c07
Fix even more clippy warnings
2020-10-30 10:13:39 -04:00
Camille GILLOT
0a4d948b4a
Remove unused ProfileCategory.
2020-10-22 22:35:32 +02:00
Julian Wollersberger
52cedcab92
Remove <CTX: QueryContext> in a bunch of places.
...
It was only needed by `find_cycle_in_stack()` in job.rs, but needed to be forwarded through dozens of types.
2020-10-19 11:11:09 +02:00
Julian Wollersberger
39b0e79285
Remove generic argument from QueryConfig
.
2020-10-12 16:04:49 +02:00
mark
9e5f7d5631
mv compiler to compiler/
2020-08-30 18:45:07 +03:00