about summary refs log tree commit diff
path: root/src/librustc/dep_graph
AgeCommit message (Collapse)AuthorLines
2017-09-05rustc: Migrate `CStore::expored_symbols` to a queryAlex Crichton-0/+1
2017-09-05rustc: Move `impl_defaultness` to a queryAlex Crichton-0/+1
2017-09-05rustc: Move a few more cstore methods to queriesAlex Crichton-5/+8
This comit applies the following changes: * Deletes the `is_allocator` query as it's no longer used * Moves the `is_sanitizer_runtime` method to a query * Moves the `is_profiler_runtime` method to a query * Moves the `panic_strategy` method to a query * Moves the `is_no_builtins` method to a query * Deletes the cstore method of `is_compiler_builtins`. The query was added in #42588 but the `CrateStore` method was not deleted A good bit of these methods were used late in linking during trans so a new dedicated structure was created to ship a calculated form of this information over to the linker rather than having to ship the whole of `TyCtxt` over to linking.
2017-09-05Avoid hashing when creating a DepNode from a HirIdAriel Ben-Yehuda-1/+20
Instead, combine the already-present DefPathHash with the 32-bit ItemLocalIndex. Should fix #44323.
2017-09-01rustc: rename CodeExtent to Scope and RegionMaps to ScopeTree.Eduard-Mihai Burtescu-1/+1
2017-08-30Merge branch 'hide-trait-map' into rollupAlex Crichton-0/+3
2017-08-29rustc: Make the `export_map` of TyCtxt privateAlex Crichton-0/+1
This map, like `trait_map`, is calculated in resolve, but we want to be sure to track it for incremental compliation. Hide it behind a query to get more refactorings later.
2017-08-29rustc: Make the `trait_map` of TyCtxt privateAlex Crichton-0/+2
This map is calculated in resolve, but we want to be sure to track it for incremental compliation. Hide it behind a query to get more refactorings later.
2017-08-29rustc: Remove `specailization_cache` in favor of a queryAlex Crichton-0/+1
This commit removes the `specialization_cache` field of `TyCtxt` by moving it to a dedicated query, which it turned out was already quite easily structured to do so!
2017-08-28Merge branch 'master' of https://github.com/rust-lang/rust into genJohn Kåre Alsaker-0/+2
2017-08-27Move unused-extern-crate to late passTatsuyuki Ishi-0/+2
2017-08-25Merge remote-tracking branch 'origin/master' into genAlex Crichton-2/+17
2017-08-25Auto merge of #44012 - michaelwoerister:cache-hir-dep-node-index, r=nikomatsakisbors-2/+10
incr.comp.: Cache Hir-DepNodeIndices in the HIR map. In preparation for red/green. This should also be faster than before without any additional memory cost. r? @nikomatsakis
2017-08-23-Z profile-queries includes dep_graph.with_task uses in outputMatthew Hammer-0/+7
2017-08-22incr.comp.: Cache Hir-DepNodeIndices in the HIR map.Michael Woerister-2/+10
2017-08-21Merge remote-tracking branch 'origin/master' into genAlex Crichton-0/+2
2017-08-21Expose mir-borrowck via a query.Felix S. Klock II-0/+2
(A followup commit removes the mir::transform based entry point.)
2017-08-14Use a DepNode for the generator signatureJohn Kåre Alsaker-0/+1
2017-08-09rustc: Rearchitect lints to be emitted more eagerlyAlex Crichton-0/+1
In preparation for incremental compilation this commit refactors the lint handling infrastructure in the compiler to be more "eager" and overall more incremental-friendly. Many passes of the compiler can emit lints at various points but before this commit all lints were buffered in a table to be emitted at the very end of compilation. This commit changes these lints to be emitted immediately during compilation using pre-calculated lint level-related data structures. Linting today is split into two phases, one set of "early" lints run on the `syntax::ast` and a "late" set of lints run on the HIR. This commit moves the "early" lints to running as late as possible in compilation, just before HIR lowering. This notably means that we're catching resolve-related lints just before HIR lowering. The early linting remains a pass very similar to how it was before, maintaining context of the current lint level as it walks the tree. Post-HIR, however, linting is structured as a method on the `TyCtxt` which transitively executes a query to calculate lint levels. Each request to lint on a `TyCtxt` will query the entire crate's 'lint level data structure' and then go from there about whether the lint should be emitted or not. The query depends on the entire HIR crate but should be very quick to calculate (just a quick walk of the HIR) and the red-green system should notice that the lint level data structure rarely changes, and should hopefully preserve incrementality. Overall this resulted in a pretty big change to the test suite now that lints are emitted much earlier in compilation (on-demand vs only at the end). This in turn necessitated the addition of many `#![allow(warnings)]` directives throughout the compile-fail test suite and a number of updates to the UI test suite.
2017-08-03incr.comp.: Make ConstEval dep-node anonymous.Michael Woerister-7/+9
2017-08-01incr.comp.: Assert that no DepNode is re-opened (see issue #42298).Michael Woerister-0/+11
2017-07-12integrate anon dep nodes into trait selectionNiko Matsakis-32/+10
2017-07-10don't panic in `dep_node_debug_str` if `self.data` is `None`Niko Matsakis-1/+1
2017-07-10incr.comp.: Cache DepNodes with corresponding query results.Michael Woerister-21/+50
2017-07-10incr.comp.: Introduce the concept of anonymous DepNodes.Michael Woerister-90/+200
2017-07-10incr.comp.: Manage dependency graph on main thread.Michael Woerister-470/+173
2017-07-10Fix some `tidy` errors.Michael Woerister-1/+6
2017-07-10Deduplicate DepNode::ConstEval()Michael Woerister-2/+3
2017-07-10Allow 'tcx in define_dep_nodes! and deduplicate some DepNodes.Michael Woerister-15/+17
2017-07-10incr.comp.: Improve debug output for work products.Michael Woerister-3/+4
2017-07-10Split DepNode::ItemSignature into non-overlapping variants.Michael Woerister-6/+16
2017-07-05use field init shorthand in src/librustcZack M. Davis-5/+5
The field init shorthand syntax was stabilized in 1.17.0 (aebd94f); we are now free to use it in the compiler.
2017-06-18rustc: Check if def_path_hash_to_def_id is populated before accessing it.Florian Hahn-5/+5
Without this patch, there is an ICE when running rustc with RUST_LOG=debug. This patch updates extract_def_id to check if the map has been populated before accessing it. This fixes the problem, but maybe we do not need to compute the incremental hashes maps in the first place when we are not in incremental mode?
2017-06-16Auto merge of #42598 - cramertj:track-more-metadata, r=nikomatsakisbors-2/+7
Track more crate metadata Part of https://github.com/rust-lang/rust/issues/41417 r? @nikomatsakis
2017-06-15Divide up metadata into separate DepNodesTaylor Cramer-2/+6
2017-06-15Auto merge of #42625 - michaelwoerister:dep-node-debug, r=nikomatsakisbors-4/+145
incr.comp.: Make DepNode's std::fmt::Debug implementation useful again. With #42537 a regular `DepNode` only contains an opaque hash as its identifier. In most cases, this hash is actually a `DefPathHash` and we can reconstruct the `DefId` it came from via a table lookup --- and then use that to print something intelligible for debug outputs. For cases where we cannot reconstruct information from the DepNode's hash, this PR will cache a string representation of the `DepNode` in a side-table. This string is later used for debug outputs. r? @nikomatsakis
2017-06-14Switch CrateNum queries to DefIdTaylor Cramer-1/+0
2017-06-14Add CrateNum-taking ability to the provide macroTaylor Cramer-0/+1
2017-06-13On-demand is_const_fnTaylor Cramer-0/+1
2017-06-13dep_node: Add comment about method specialization being just a performance ↵Michael Woerister-0/+6
optimization
2017-06-13incr.comp.: Make DepNode's std::fmt::Debug implementation useful again.Michael Woerister-4/+139
2017-06-12kill various DepNode variantsNiko Matsakis-3/+0
2017-06-12kill various tasks we no longer need and remove outdated README textNiko Matsakis-138/+4
In the case of `TransCrateItem`, I had to tweak the tests a bit, but it's a concept that doesn't work well under new system.
2017-06-12Add some documentation to the dep_node module.Michael Woerister-0/+52
2017-06-09incr.comp.: Uniformly represent DepNodes as (Kind, StableHash) pairs.Michael Woerister-332/+435
2017-06-07Allocate DefIndices for global crate metadata.Michael Woerister-18/+0
This allows for treating global crate metadata the same as regular metadata with regard to incr. comp.
2017-06-06incr.comp.: Make WorkProductId opaque so we don't accidentally rely on being ↵Michael Woerister-11/+21
able to reconstruct obj-file names from one.
2017-06-03Module doc comment for librustc/dep_graph/safe.rsbjorn3-0/+2
2017-06-03Make some comments docs in librustc/dep_graph/dep_node.rsbjorn3-53/+53
2017-06-02Auto merge of #42381 - Mark-Simulacrum:rollup, r=Mark-Simulacrumbors-1/+1
Rollup of 10 pull requests - Successful merges: #41981, #42225, #42310, #42319, #42335, #42343, #42355, #42360, #42370, #42372 - Failed merges: