Mark Rousskov
41f124c824
Avoid sharding query caches entirely in single-threaded mode
2022-02-20 14:57:34 -05:00
Mark Rousskov
75ef068920
Delete QueryLookup
...
This was largely just caching the shard value at this point, which is not
particularly useful -- in the use sites the key was being hashed nearby anyway.
2022-02-20 12:11:28 -05:00
Mark Rousskov
9deed6f74e
Move Sharded maps into each QueryCache impl
2022-02-20 12:10:46 -05: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
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
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
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
Aaron Hill
6417760632
Run fmt
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
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
mark
9e5f7d5631
mv compiler to compiler/
2020-08-30 18:45:07 +03:00