about summary refs log tree commit diff
path: root/compiler/rustc_query_impl
AgeCommit message (Collapse)AuthorLines
2021-04-12Introduce CompileMonoItem DepNodebjorn3-0/+5
2021-04-02Auto merge of #83207 - oli-obk:valtree2, r=lcnrbors-0/+9
normalize mir::Constant differently from ty::Const in preparation for valtrees Valtrees are unable to represent many kind of constant values (this is on purpose). For constants that are used at runtime, we do not need a valtree representation and can thus use a different form of evaluation. In order to make this explicit and less fragile, I added a `fold_constant` method to `TypeFolder` and implemented it for normalization. Normalization can now, when it wants to eagerly evaluate a constant, normalize `mir::Constant` directly into a `mir::ConstantKind::Val` instead of relying on the `ty::Const` evaluation. In the future we can get rid of the `ty::Const` in there entirely and add our own `Unevaluated` variant to `mir::ConstantKind`. This would allow us to remove the `promoted` field from `ty::ConstKind::Unevaluated`, as promoteds can never occur in the type system. cc `@rust-lang/wg-const-eval` r? `@lcnr`
2021-03-31Add a new normalization query just for mir constantsOli Scherer-0/+9
2021-03-30Stream the dep-graph to a file.Camille GILLOT-4/+1
2021-03-29Don't duplicate the extern providers once for each cratebjorn3-15/+13
2021-03-16Auto merge of #82936 - oli-obk:valtree, r=RalfJung,lcnr,matthewjasperbors-0/+9
Implement (but don't use) valtree and refactor in preparation of use This PR does not cause any functional change. It refactors various things that are needed to make valtrees possible. This refactoring got big enough that I decided I'd want it reviewed as a PR instead of trying to make one huge PR with all the changes. cc `@rust-lang/wg-const-eval` on the following commits: * 2027184 implement valtree * eeecea9 fallible Scalar -> ScalarInt * 042f663 ScalarInt convenience methods cc `@eddyb` on ef04a6d cc `@rust-lang/wg-mir-opt` for cf1700c (`mir::Constant` can now represent either a `ConstValue` or a `ty::Const`, and it is totally possible to have two different representations for the same value)
2021-03-12Implement valtreeOli Scherer-0/+9
valtree is a version of constants that is inherently safe to be used within types. This is in contrast to ty::Const which can have different representations of the same value. These representation differences can show up in hashing or equality comparisons, breaking type equality of otherwise equal types. valtrees do not have this problem.
2021-03-10Update to rustc-rayon 0.3.1Josh Stone-1/+1
This pulls in rust-lang/rustc-rayon#8 to fix #81425. (h/t @ammaraskar) That revealed weak constraints on `rustc_arena::DropArena`, because its `DropType` was holding type-erased raw pointers to generic `T`. We can implement `Send` for `DropType` (under `cfg(parallel_compiler)`) by requiring all `T: Send` before they're type-erased.
2021-02-21Simplify hashing.Camille GILLOT-2/+2
2021-02-20Move print_query_stack to rustc_query_system.Camille GILLOT-33/+3
2021-02-20Move report_cycle to rustc_query_system.Camille GILLOT-57/+7
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-43/+16
Rename it to QueryStackFrame and document a bit.
2021-02-20Do not hold query key in Query.Camille GILLOT-54/+62
2021-02-20Access the session directly from DepContext.Camille GILLOT-15/+0
2021-02-19Workaround rustdoc not honouring cfg(parallel_compiler).Camille GILLOT-4/+6
2021-02-19Move the query system to rustc_query_impl.Camille GILLOT-0/+1659