about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/queries.rs
AgeCommit message (Collapse)AuthorLines
2023-02-09Remove `QueryContext`.Nicholas Nethercote-13/+14
There is a type `QueryCtxt`, which impls the trait `QueryContext`. Confusingly, there is another type `QueryContext`. The latter is (like `TyCtxt`) just a pointer to a `GlobalContext`. It's not used much, e.g. its `impl` block has a single method. This commit removes `QueryContext`, replacing its use with direct `GlobalCtxt` use.
2023-01-23Store the gctxt instead of fetching it twice.Oli Scherer-1/+1
2023-01-23Make `output_filenames` a real queryOli Scherer-8/+0
2023-01-23Remove another unneeded use of the resolverOli Scherer-2/+7
2023-01-16Avoid one more call site to `Compiler::expansion`Oli Scherer-1/+1
2023-01-16Move compiler input and ouput paths into sessionOli Scherer-12/+4
2023-01-16Group some commonly passed together values into a structOli Scherer-2/+2
2023-01-16remove some arguments that can also be fed at the caller sideOli Scherer-7/+23
2023-01-16Remove `prepare_outputs`Oli Scherer-19/+9
2023-01-12Harden the pre-tyctxt query system against accidental recomputationOli Scherer-48/+60
2022-12-18don't clone Copy typesMatthias Krüger-1/+1
2022-12-07Use `Symbol` for the crate name instead of `String`/`str`Oli Scherer-10/+11
2022-12-03Remove all but one call site of `prepare_outputs` and fetch the value from ↵Oli Scherer-6/+8
the TyCtxt instead
2022-11-16Use `as_deref` in compiler (but only where it makes sense)Maybe Waffle-5/+1
2022-09-30Fix typonils-1/+1
2022-09-30Update compiler/rustc_interface/src/queries.rsCamille Gillot-1/+1
2022-09-30Add comment explaining why we flush delayed bugs before codegennils-0/+2
2022-09-27Flush delayed bugs before codegenNilstrieb-0/+2
Sometimes it can happen that invalid code like a TyKind::Error makes its way through the compiler without triggering any errors (this is always a bug in rustc but bugs do happen sometimes :)). These ICEs will manifest in the backend like as cg_llvm not being able to get the layout of `[type error]`, which makes it hard to debug. By flushing before codegen, we display all the delayed bugs, making it easier to trace it to the root of the problem.
2022-09-01Always import all tracing macros for the entire crate instead of piecemeal ↵Oli Scherer-1/+1
by module
2022-08-22Remove use of DiagnosticArgFromDisplayGiacomo Stevanato-6/+2
2022-08-22Move rustc_interface diagnostics to struct SessionDiagnostic derivesGiacomo Stevanato-9/+9
2022-07-13Rename `debugging_opts` to `unstable_opts`Joshua Nelson-1/+1
This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`). Rename it to be more clear.
2022-07-06Make AST lowering a query.Camille GILLOT-5/+5
2022-05-10only_local: always check for misuselcnr-4/+1
2022-04-02Address review comments and add a testJakub Beránek-1/+1
2022-04-02Include a header in .rlink files to provide nicer error messages when a ↵Jakub Beránek-3/+3
wrong file is parsed as .rlink
2022-03-16rustc_error: make ErrorReported impossible to constructmark-5/+2
There are a few places were we have to construct it, though, and a few places that are more invasive to change. To do this, we create a constructor with a long obvious name.
2022-03-02rename ErrorReported -> ErrorGuaranteedmark-2/+2
2022-02-19Adopt let else in more placesest31-4/+1
2022-02-09Auto merge of #93724 - Mark-Simulacrum:drop-query-stats, r=michaelwoeristerbors-4/+0
Delete -Zquery-stats infrastructure 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 -- locally, this PR shaves ~2.5% from rustc_query_impl builds in instruction counts. If this does lose some functionality we want to keep, I think we should migrate it to self-profile (or a similar interface) rather than this ad-hoc reporting.
2022-02-06Delete query statsMark Rousskov-4/+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-05Store rlink data in opaque binary format on diskMark Rousskov-6/+3
2021-12-13Use `OutputFilenames` to generate output file for `-Zllvm-time-trace`Tomasz Miąsko-2/+5
The resulting profile will include the crate name and will be stored in the `--out-dir` directory. This implementation makes it convenient to use LLVM time trace together with cargo, in the contrast to the previous implementation which would overwrite profiles or store them in `.cargo/registry/..`.
2021-10-01Fix clippy lintsGuillaume Gomez-4/+4
2021-09-28rustc_session: Remove lint store from `Session`Vadim Petrochenkov-2/+2
2021-08-21Remove `Session.used_attrs` and move logic to `CheckAttrVisitor`Aaron Hill-1/+1
Instead of updating global state to mark attributes as used, we now explicitly emit a warning when an attribute is used in an unsupported position. As a side effect, we are to emit more detailed warning messages (instead of just a generic "unused" message). `Session.check_name` is removed, since its only purpose was to mark the attribute as used. All of the callers are modified to use `Attribute.has_name` Additionally, `AttributeType::AssumedUsed` is removed - an 'assumed used' attribute is implemented by simply not performing any checks in `CheckAttrVisitor` for a particular attribute. We no longer emit unused attribute warnings for the `#[rustc_dummy]` attribute - it's an internal attribute used for tests, so it doesn't mark sense to treat it as 'unused'. With this commit, a large source of global untracked state is removed.
2021-06-30Fix AST pretty.Camille GILLOT-3/+3
2021-06-30Move AST crate.Camille GILLOT-11/+9
2021-06-30Move lowering to create_global_ctxt.Camille GILLOT-14/+2
2021-06-30Inline lower_to_hir.Camille GILLOT-33/+18
2021-06-30Separate resolver creation from expansion.Camille GILLOT-8/+9
2021-06-30Simplify DepGraph creation.Camille GILLOT-25/+12
2021-06-04A couple of small cleanupsbjorn3-12/+15
2021-05-25Don't panic when failing to initialize incremental directory.Eric Huss-2/+2
2021-05-12Use () for analysis.Camille GILLOT-1/+1
2021-05-12Use () for entry_fn.Camille GILLOT-1/+1
2021-04-29Implement RFC 1260 with feature_name `imported_main`.Charles Lew-1/+1
2021-03-30Stream the dep-graph to a file.Camille GILLOT-1/+10
2021-02-19Move the query system to rustc_query_impl.Camille GILLOT-4/+4
2021-02-19Make alloc_self_profile_query_strings a standalone function.Camille GILLOT-1/+1