about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
AgeCommit message (Collapse)AuthorLines
2024-03-04Avoid using unnecessary queries when printing the query stack in panicsJohn Kåre Alsaker-2/+7
2024-03-03Add a proper `with_no_queries` to printingJohn Kåre Alsaker-11/+4
2024-02-28Rename `Diagnostic` as `DiagInner`.Nicholas Nethercote-2/+2
I started by changing it to `DiagData`, but that didn't feel right. `DiagInner` felt much better.
2024-02-15Replace `NonZero::<_>::new` with `NonZero::new`.Markus Reiter-4/+2
2024-02-15Use generic `NonZero` internally.Markus Reiter-2/+3
2024-02-06Invert diagnostic lints.Nicholas Nethercote-2/+0
That is, change `diagnostic_outside_of_impl` and `untranslatable_diagnostic` from `allow` to `deny`, because more than half of the compiler has be converted to use translated diagnostics. This commit removes more `deny` attributes than it adds `allow` attributes, which proves that this change is warranted.
2024-01-25Remove unused featuresclubby789-2/+0
2024-01-09Rollup merge of #119527 - klensy:ordering, r=compiler-errorsGuillaume Gomez-1/+1
don't reexport atomic::ordering via rustc_data_structures, use std import This looks simpler.
2024-01-08Don't check for recursion in generator witness fieldsMichael Goulet-2/+2
2024-01-08Value recovery can take the whole CycleErrorMichael Goulet-3/+3
2024-01-06don't reexport atomic::ordering via rustc_data_structures, use std importklensy-1/+1
2023-12-31Remove two unused feature gates from rustc_query_implbjorn3-3/+0
2023-12-26Auto merge of #119129 - jyn514:verbose, r=compiler-errors,estebankbors-2/+5
rework `-Zverbose` implements the changes described in https://github.com/rust-lang/compiler-team/issues/706 the first commit is only a name change from `-Zverbose` to `-Zverbose-internals` and does not change behavior. the second commit changes diagnostics. possible follow up work: - `ty::pretty` could print more info with `--verbose` than it does currently. `-Z verbose-internals` shows too much info in a way that's not helpful to users. michael had ideas about this i didn't fully understand: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/uplift.20some.20-Zverbose.20calls.20and.20rename.20to.E2.80.A6.20compiler-team.23706/near/408984200 - `--verbose` should imply `-Z write-long-types-to-disk=no`. the code in `ty_string_with_limit` should take `--verbose` into account (apparently this affects `Ty::sort_string`, i'm not familiar with this code). writing a file to disk should suggest passing `--verbose`. r? `@compiler-errors` cc `@estebank`
2023-12-24Remove `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-1/+1
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
2023-12-19rename to verbose-internalsjyn-2/+5
2023-11-27QueryContext: rename try_collect_active_jobs -> collect_active_jobs and ↵klensy-7/+7
change it's return type from Option<QueryMap> to QueryMap As there currently always Some(...) inside
2023-11-25rustc: Make `def_kind` mandatory for all `DefId`sVadim Petrochenkov-2/+2
2023-11-21Fix `clippy::needless_borrow` in the compilerNilstrieb-1/+1
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
2023-11-15Bump cfg(bootstrap)sMark Rousskov-2/+2
2023-10-28Rollup merge of #116534 - cjgillot:no-dep-tasks, r=davidtwcoJubilee-2/+0
Remove -Zdep-tasks. This option is not useful any more, we can use `tracing` and `RUSTC_LOG` to debug the dep-graph.
2023-10-26Stash and cancel cycle errors for auto trait leakage in opaquesMichael Goulet-0/+3
2023-10-08rustdoc: remove rust logo from non-Rust cratesMichael Howell-0/+2
2023-10-08Remove useless debugging.Camille GILLOT-2/+0
2023-09-21Move `DepKind` to `rustc_query_system` and define it as `u16`John Kåre Alsaker-15/+28
2023-09-10Remove `verbose_generic_activity_with_arg`John Kåre Alsaker-2/+1
2023-08-27Pass ErrorGuaranteed to cycle errorMichael Goulet-4/+5
2023-08-23Bump cfg(bootstrap)Mark Rousskov-1/+1
2023-08-03Add `internal_features` lintNilstrieb-0/+1
It lints against features that are inteded to be internal to the compiler and standard library. Implements MCP #596. We allow `internal_features` in the standard library and compiler as those use many features and this _is_ the standard library from the "internal to the compiler and standard library" after all. Marking some features as internal wasn't exactly the most scientific approach, I just marked some mostly obvious features. While there is a categorization in the macro, it's not very well upheld (should probably be fixed in another PR). We always pass `-Ainternal_features` in the testsuite About 400 UI tests and several other tests use internal features. Instead of throwing the attribute on each one, just always allow them. There's nothing wrong with testing internal features^^
2023-07-23fix couple of clippy findings:Matthias Krüger-1/+1
filter_map_identity iter_kv_map needless_question_mark redundant_at_rest_pattern filter_next derivable_impls
2023-06-27Avoid calling queries during query stack printingOli Scherer-3/+3
2023-06-21Make queries traceable againOli Scherer-1/+9
2023-05-21Add commentJohn Kåre Alsaker-0/+2
2023-05-21Replace `QueryStruct` with arrays local to `rustc_query_impl`John Kåre Alsaker-69/+72
2023-05-19Merge some query impl modules into oneJohn Kåre Alsaker-143/+125
2023-05-18Merge query property modules into oneJohn Kåre Alsaker-25/+25
2023-05-18Auto merge of #108938 - chenyukang:yukang/fix-107910-shorten-ice, r=cjgillotbors-35/+58
Shorten backtraces for queries in ICEs r? `@jyn514` Fixes #107910
2023-05-17Fix #107910, Shorten backtraces in ICEsyukang-35/+58
2023-05-17Finish move of query.rsJohn Kåre Alsaker-4/+3
2023-05-16Auto merge of #108062 - Zoxc:spec-incr, r=cjgillotbors-7/+37
Specialize query execution for incremental and non-incremental This specializes query execution for incremental and non-incremental by passing in a separate `dyn QueryEngine` types, taking advantage of the virtual dispatch to avoid a branch. This ends up duplicating `try_execute_query`, hopefully the compile time cost of that is relatively low. This is a performance improvement for the non-incremental path: <table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th></tr><tr><td>🟣 <b>clap</b>:check</td><td align="right">1.8420s</td><td align="right">1.8331s</td><td align="right"> -0.48%</td></tr><tr><td>🟣 <b>hyper</b>:check</td><td align="right">0.2652s</td><td align="right">0.2631s</td><td align="right"> -0.78%</td></tr><tr><td>🟣 <b>regex</b>:check</td><td align="right">1.0161s</td><td align="right">1.0062s</td><td align="right"> -0.98%</td></tr><tr><td>🟣 <b>syn</b>:check</td><td align="right">1.6408s</td><td align="right">1.6197s</td><td align="right">💚 -1.28%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check</td><td align="right">6.3939s</td><td align="right">6.3558s</td><td align="right"> -0.60%</td></tr><tr><td>Total</td><td align="right">11.1580s</td><td align="right">11.0780s</td><td align="right"> -0.72%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9918s</td><td align="right"> -0.82%</td></tr></table> The incremental path is more neutral: <table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th></tr><tr><td>🟣 <b>clap</b>:check:initial</td><td align="right">2.2210s</td><td align="right">2.2227s</td><td align="right"> 0.08%</td></tr><tr><td>🟣 <b>hyper</b>:check:initial</td><td align="right">0.3441s</td><td align="right">0.3443s</td><td align="right"> 0.05%</td></tr><tr><td>🟣 <b>regex</b>:check:initial</td><td align="right">1.2919s</td><td align="right">1.2877s</td><td align="right"> -0.33%</td></tr><tr><td>🟣 <b>syn</b>:check:initial</td><td align="right">2.0749s</td><td align="right">2.0721s</td><td align="right"> -0.14%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check:initial</td><td align="right">7.9266s</td><td align="right">7.9206s</td><td align="right"> -0.07%</td></tr><tr><td>Total</td><td align="right">13.8585s</td><td align="right">13.8474s</td><td align="right"> -0.08%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9992s</td><td align="right"> -0.08%</td></tr></table> r? `@cjgillot`
2023-05-15Move expansion of query macros in rustc_middle to rustc_middle::queryJohn Kåre Alsaker-3/+3
2023-05-14Specialize query execution for incremental and non-incrementalJohn Kåre Alsaker-7/+37
2023-04-30Use dynamic dispatch for queriesJohn Kåre Alsaker-162/+287
2023-04-26Remove QueryEngine traitJohn Kåre Alsaker-205/+144
2023-04-26Move on_disk_cache.rsJohn Kåre Alsaker-1064/+0
2023-04-26Auto merge of #110634 - saethlin:pointy-decoder, r=cjgillotbors-44/+12
Rewrite MemDecoder around pointers not a slice This is basically https://github.com/rust-lang/rust/pull/109910 but I'm being a lot more aggressive. The pointer-based structure means that it makes a lot more sense to absorb more complexity into `MemDecoder`, most of the diff is just complexity moving from one place to another. The primary argument for this structure is that we only incur a single bounds check when doing multi-byte reads from a `MemDecoder`. With the slice-based implementation we need to do those with `data[position..position + len]` , which needs to account for `position + len` wrapping. It would be possible to dodge the first bounds check if we stored a slice that starts at `position`, but that would require updating the pointer and length on every read. This PR also embeds the failure path in a separate function, which means that this PR should subsume all the perf wins observed in https://github.com/rust-lang/rust/pull/109867.
2023-04-24Split `{Idx, IndexVec, IndexSlice}` into their own modulesMaybe Waffle-1/+1
2023-04-23Rewrite MemDecoder around pointers not a sliceBen Kimock-44/+12
2023-04-21Rollup merge of #110632 - saethlin:panic-if-dep-graph-too-big, r=lcnrDylan DPC-1/+1
Panic instead of truncating if the incremental on-disk cache is too big It seems _unlikely_ that anyone would hit this truncation, but if this `as` does actually truncate, that seems incredibly bad.
2023-04-20Panic instead of truncating if the dep graph is too bigBen Kimock-1/+1
2023-04-20Remove WithOptconstParam.Camille GILLOT-32/+1