summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2022-02-25Switch bootstrap cfgsMark Rousskov-1/+1
2022-02-17Remove SimpleDefKindMark Rousskov-2/+0
2022-02-09Auto merge of #93741 - Mark-Simulacrum:global-job-id, r=cjgillotbors-0/+1
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-08Switch QueryJobId to a single global counterMark Rousskov-0/+1
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-06Delete query statsMark Rousskov-3/+0
These statistics are computable from the self-profile data and/or ad-hoc collectable as needed, and in the meantime contribute to rustc bootstrap times.
2022-02-01add a rustc::query_stability lintlcnr-0/+1
2021-12-14Remove `in_band_lifetimes` from `rustc_query_impl`LegionMammal978-1/+0
See #91867 for more information.
2021-10-28Revert "Add rustc lint, warning when iterating over hashmaps"Mark Rousskov-1/+0
2021-10-25Avoid a branch on key being local for queries that use the same local and ↵bjorn3-1/+1
extern providers
2021-10-25Auto merge of #90210 - cjgillot:qarray2, r=Mark-Simulacrumbors-6/+11
Build the query vtable directly. Continuation of https://github.com/rust-lang/rust/pull/89978. This shrinks the query interface and attempts to reduce the amount of function pointer calls.
2021-10-24Rollup merge of #89558 - lcnr:query-stable-lint, r=estebankMatthias Krüger-0/+1
Add rustc lint, warning when iterating over hashmaps r? rust-lang/wg-incr-comp
2021-10-23Build the query vtable directly.Camille GILLOT-6/+11
2021-10-20Build jump table at runtime.Camille GILLOT-0/+1
2021-10-20Invoke callbacks from rustc_middle.Camille GILLOT-2/+0
2021-10-20Merge two query callbacks arrays.Camille GILLOT-2/+1
2021-10-15allow `potential_query_instability` everywherelcnr-0/+1
2021-10-03Remove re-export.Camille GILLOT-1/+1
2021-08-27Note that type aliases cannot be recursiveNoah Lev-0/+2
2021-07-18Move OnDiskCache to rustc_query_impl.Camille GILLOT-3/+7
2021-06-15Auto merge of #85154 - cjgillot:lessfn, r=bjorn3bors-1/+0
Reduce amount of function pointers in query invocation. r? `@ghost`
2021-05-31Remove unused feature gatesbjorn3-4/+0
2021-05-30Only test if key is local.Camille GILLOT-1/+0
2021-05-15Move key recovering into force_query.Camille GILLOT-1/+1
2021-03-29Don't duplicate the extern providers once for each cratebjorn3-2/+1
2021-02-20Move print_query_stack to rustc_query_system.Camille GILLOT-1/+1
2021-02-20Move report_cycle to rustc_query_system.Camille GILLOT-1/+1
The call to `ty::print::with_forced_impl_filename_line` is done when constructing the description, at the construction of the QueryStackFrame.
2021-02-20Move Query to rustc_query_system.Camille GILLOT-1/+0
Rename it to QueryStackFrame and document a bit.
2021-02-20Do not hold query key in Query.Camille GILLOT-2/+1
2021-02-19Move the query system to rustc_query_impl.Camille GILLOT-0/+65