about summary refs log tree commit diff
path: root/compiler/rustc_query_system/src/query
AgeCommit message (Collapse)AuthorLines
2023-02-16Remove parallel compiler fixJohn Kåre Alsaker-4/+1
2023-02-16Move provider fields back to rustc_query_implJohn Kåre Alsaker-8/+6
2023-02-16Factor query arena allocation out from query cachesJohn Kåre Alsaker-196/+33
2023-02-15don't clone types that are copyMatthias Krüger-3/+3
2023-02-14Pass `DepContext` and `QueryContext` by value when practicalJohn Kåre Alsaker-8/+8
2023-02-11Create a single value cache for the () query keyJohn Kåre Alsaker-2/+48
2023-02-08Auto merge of #107644 - Zoxc:query-cache-tweak, r=cjgillotbors-37/+4
Remove QueryStorage::store_nocache This method was added in https://github.com/rust-lang/rust/pull/70674 but it doesn't seem to serve any purpose.
2023-02-07Remove QueryStorage::store_nocacheJohn Kåre Alsaker-37/+4
2023-02-06Make an optimal cold path for query_cache_hitJohn Kåre Alsaker-12/+4
2023-02-06Don't inline query_cache_hit to reduce code size of the query hot path.John Kåre Alsaker-1/+3
2023-02-04Support parallel compiler.Camille GILLOT-3/+3
2023-02-04Remove `OnHit` callback from query caches.Camille GILLOT-84/+45
This is not useful now that query results are `Copy`.
2023-01-31Fingerprint even when incr comp is disabled in debug modeMichael Goulet-1/+18
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-2/+2
2023-01-05Fix `uninlined_format_args` for some compiler cratesnils-7/+5
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-02Abolish `QueryVTable` in favour of more assoc items on `QueryConfig`Nilstrieb-95/+73
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.
2022-12-24Rollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholkMatthias Krüger-2/+2
rustc: Remove needless lifetimes
2022-12-23Auto merge of #105550 - gimbles:master, r=Nilstriebbors-87/+111
Use `DepKind` instead of `&'static str` in `QueryStackFrame` `@rustbot` author Fixes #105168
2022-12-23Use DepKind instead of &strgimbles-87/+111
2022-12-20rustc: Remove needless lifetimesJeremy Stucki-2/+2
2022-12-10compiler: remove unnecessary imports and qualified pathsKaDiWa-4/+3
2022-11-29Sanity check computed value for feeable queries.Camille GILLOT-3/+20
2022-11-29Expand hash check.Camille GILLOT-14/+18
2022-11-29Sanity check fingerprints in the dep-graph.Camille GILLOT-0/+4
2022-11-24Auto merge of #103808 - cjgillot:vec-cache, r=TaKO8Kibors-12/+193
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-06Rename `Ctxt` and `CTX` to `Tcx` and `Qcx`Nilstrieb-74/+74
This makes it consistent and clear which context is used.
2022-11-06Rename `tcx` to `qcx` when it's a `QueryContext`Nilstrieb-75/+75
2022-11-06Improve tracing loggingNilstrieb-2/+2
2022-11-06Rename `incremental_verify_ich_cold` to `incremental_verify_ich_failed`Nilstrieb-8/+12
2022-11-05Merge `QueryDescription` into `QueryConfig`Nilstrieb-27/+27
`QueryDescription` has gone through a lot of refactoring and doesn't make sense anymore.
2022-11-01Use Key impl to select cache.Camille GILLOT-1/+27
2022-11-01Use VecCache for LocalDefId.Camille GILLOT-1/+175
2022-11-01Remove CacheSelector.Camille GILLOT-20/+1
2022-10-14Remove the `describe` method from the `QueryDescription` traitnils-2/+0
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-07Rewrite representabilityCameron Steffen-9/+17
2022-09-21FIX - adopt new Diagnostic naming in newly migrated modulesJhonny Bill Mena-1/+1
FIX - ambiguous Diagnostic link in docs UPDATE - rename diagnostic_items to IntoDiagnostic and AddToDiagnostic [Gardening] FIX - formatting via `x fmt` FIX - rebase conflicts. NOTE: Confirm wheather or not we want to handle TargetDataLayoutErrorsWrapper this way DELETE - unneeded allow attributes in Handler method FIX - broken test FIX - Rebase conflict UPDATE - rename residual _SessionDiagnostic and fix LintDiag link
2022-09-21UPDATE - rename DiagnosticHandler trait to IntoDiagnosticJhonny Bill Mena-1/+1
2022-09-21UPDATE - move SessionDiagnostic from rustc_session to rustc_errorsJhonny Bill Mena-2/+4
2022-09-15correct span, add help message and add UI test when query depth overflowsSparrowLii-19/+3
2022-09-15add note for `layout_of` when query depth overflowsSparrowLii-3/+36
2022-09-09Remove unnecessary `TRY_LOAD_FROM_DISK` constantJoshua Nelson-4/+1
2022-09-09Remove `cache_on_disk` from `QueryVTable`Joshua Nelson-11/+5
This is not only simpler, but removes a generic function and unwrap. I have hope it will see compile time and bootstrap time improvements.
2022-09-08Auto merge of #101303 - jyn514:jnelson/handle-cycle-enum, r=cjgillotbors-5/+38
Make `HandleCycleError` an enum instead of a macro-generated closure Helps with https://github.com/rust-lang/rust/issues/96524. Based on https://github.com/rust-lang/rust/pull/100943 to avoid merge conflicts, so it looks larger than it is (only the last commit is relevant). cc https://rust-lang.zulipchat.com/#narrow/stream/241847-t-compiler.2Fwg-incr-comp/topic/Moving.20.60Value.60.20to.20rustc_query_system.20.2396524 r? `@cjgillot`
2022-09-06Make `HandleCycleError` an enum instead of a macro-generated closureJoshua Nelson-5/+38
- Add a `HandleCycleError` enum to rustc_query_system, along with a `handle_cycle_error` function - Move `Value` to rustc_query_system, so `handle_cycle_error` can use it - Move the `Value` impls from rustc_query_impl to rustc_middle. This is necessary due to orphan rules.
2022-09-05UPDATE - into_diagnostic to take a Handler instead of a ParseSessJhonny Bill Mena-1/+1
Suggested by the team in this Zulip Topic https://rust-lang.zulipchat.com/#narrow/stream/336883-i18n/topic/.23100717.20SessionDiagnostic.20on.20Handler Handler already has almost all the capabilities of ParseSess when it comes to diagnostic emission, in this migration we only needed to add the ability to access source_map from the emitter in order to get a Snippet and the start_point. Not sure if this is the best way to address this gap
2022-09-01Don't create two new closures for each queryJoshua Nelson-0/+3
- Parameterize DepKindStruct over `'tcx` This allows passing in an invariant function pointer in `query_callback`, rather than having to try and make it work for any lifetime. - Add a new `execute_query` function to `QueryDescription` so we can call `tcx.$name` without needing to be in a macro context
2022-09-01Auto merge of #100869 - nnethercote:replace-ThinVec, r=spastorinobors-3/+2
Replace `rustc_data_structures::thin_vec::ThinVec` with `thin_vec::ThinVec` `rustc_data_structures::thin_vec::ThinVec` looks like this: ``` pub struct ThinVec<T>(Option<Box<Vec<T>>>); ``` It's just a zero word if the vector is empty, but requires two allocations if it is non-empty. So it's only usable in cases where the vector is empty most of the time. This commit removes it in favour of `thin_vec::ThinVec`, which is also word-sized, but stores the length and capacity in the same allocation as the elements. It's good in a wider variety of situation, e.g. in enum variants where the vector is usually/always non-empty. The commit also: - Sorts some `Cargo.toml` dependency lists, to make additions easier. - Sorts some `use` item lists, to make additions easier. - Changes `clean_trait_ref_with_bindings` to take a `ThinVec<TypeBinding>` rather than a `&[TypeBinding]`, because this avoid some unnecessary allocations. r? `@spastorino`
2022-08-31SessionDiagnostic for QueryOverflow errorLi Yuanheng-1/+1
2022-08-31delete leftover commentLi Yuanheng-1/+0
2022-08-31use derive proc macro to impl SessionDiagnosticYuanheng Li-13/+30
fixes `SessionSubdiagnostic` to accept multiple attributes emitting list of fluent message remains unresolved