rust/compiler/rustc_query_impl/src
bors e7aca89598 Auto merge of #93741 - Mark-Simulacrum:global-job-id, r=cjgillot
Refactor query system to maintain a global job id counter

This replaces the per-shard counters with a single global counter, simplifying
the JobId struct down to just a u64 and removing the need to pipe a DepKind
generic through a bunch of code. The performance implications on non-parallel
compilers are likely minimal (this switches to `Cell<u64>` as the backing
storage over a `u64`, but the latter was already inside a `RefCell` so it's not
really a significance divergence). On parallel compilers, the cost of a single
global u64 counter may be more significant: it adds a serialization point in
theory. On the other hand, we can imagine changing the counter to have a
thread-local component if it becomes worrisome or some similar structure.

The new design is sufficiently simpler that it warrants the potential for slight
changes down the line if/when we get parallel compilation to be more of a
default.

A u64 counter, instead of u32 (the old per-shard width), is chosen to avoid
possibly overflowing it and causing problems; it is effectively impossible that
we would overflow a u64 counter in this context.
2022-02-09 18:54:30 +00:00
..
keys.rs Remove in_band_lifetimes from rustc_query_impl 2021-12-14 12:13:07 -05:00
lib.rs Auto merge of #93741 - Mark-Simulacrum:global-job-id, r=cjgillot 2022-02-09 18:54:30 +00:00
on_disk_cache.rs Make Decodable and Decoder infallible. 2022-01-22 10:38:31 +11:00
plumbing.rs Auto merge of #93741 - Mark-Simulacrum:global-job-id, r=cjgillot 2022-02-09 18:54:30 +00:00
profiling_support.rs Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
README.md Move the query system to rustc_query_impl. 2021-02-19 17:51:58 +01:00
util.rs Note that type aliases cannot be recursive 2021-08-27 14:50:51 -07:00
values.rs Move the query system to rustc_query_impl. 2021-02-19 17:51:58 +01:00

For more information about how the query system works, see the rustc dev guide.