summary refs log tree commit diff
path: root/compiler/rustc_interface/src/queries.rs
AgeCommit message (Collapse)AuthorLines
2023-02-21Use a lock-free datastructure for `source_span`Oli Scherer-4/+2
2023-02-20Move the resolver into a queryOli Scherer-27/+4
2023-02-20Make `configure_and_expand` "infalllible" by just aborting the compilation ↵Oli Scherer-3/+2
if it fails instead of bubbling out an error
2023-02-20Use tcx queries instead of passing the values to `configure_and_expand`.Oli Scherer-8/+2
2023-02-20Stuff a TyCtxt into the ResolverOli Scherer-2/+1
2023-02-20Run the resolver after TyCtxt constructionOli Scherer-38/+53
2023-02-20Make untracked.cstore lockable so that resolution can still write to it when ↵Oli Scherer-0/+3
using TyCtxt
2023-02-14Simplify expansion logicOli Scherer-3/+3
2023-02-14Inline the expansion queryOli Scherer-28/+23
2023-02-14Remove BoxedResolverOli Scherer-13/+16
2023-02-13rustc_resolve: Remove `Resolver::clone_output`Vadim Petrochenkov-6/+4
And remove `Clone` impls and `Lrc`s that are no longer necessary
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