about summary refs log tree commit diff
path: root/src/librustc/dep_graph/mod.rs
AgeCommit message (Collapse)AuthorLines
2019-03-18Define queries using a proc macroJohn Kåre Alsaker-1/+1
2019-02-08Add a query type which is always marked as red if it runsJohn Kåre Alsaker-1/+1
2018-12-31Clean up and optimize OpenTask / read_indexJohn Kåre Alsaker-1/+1
2018-12-25Remove licensesMark Rousskov-10/+0
2018-09-18incr.comp.: Allow for more fine-grained testing of CGU reuse and use it to ↵Michael Woerister-0/+1
test incremental ThinLTO.
2018-04-25Make DepGraph thread-safeJohn Kåre Alsaker-2/+1
2017-10-25incr.comp.: Implement query diagnostic persistence.Michael Woerister-1/+1
2017-10-21rustc: Move bytecode compression into codegenAlex Crichton-0/+1
This commit moves compression of the bytecode from the `link` module to the `write` module, namely allowing it to be (a) cached by incremental compilation and (b) produced in parallel. The parallelization may show up as some nice wins during normal compilation and the caching in incremental mode should be beneficial for incremental compiles! (no more need to recompress the entire crate's bitcode on all builds)
2017-10-12incr comp: rustc_clean/dirty auto assertGarrett Berg-1/+1
This adds auto-assertion to `rustc_clean/dirty` and also implements more comprehensive testing for - src/test/incremental/hashes/enum_constructors.rs - src/test/incremental/hashes/enum_defs.rs - src/test/incremental/hashes/extern_mods.rs - src/test/incremental/hashes/inherent_impls.rs - src/test/incremental/hashes/statics.rs - src/test/incremental/hashes/struct_constructors.rs - src/test/incremental/hashes/type_defs.rs trait_defs.rs and trait_impl.rs are blocked on a hard to triage compiler ICE (at least hard for a newbie like me) having to do with some DepNodes not getting computed for traits. A FIXME has been added in the source to reflect this continued work.
2017-10-02incr.comp.: Remove legacy dep-graph runtime.Michael Woerister-1/+0
2017-10-02incr.comp.: Add minimal version of try_mark_green procedure.Michael Woerister-1/+1
2017-09-23incr.comp.: Serialize and deserialize new DepGraphMichael Woerister-7/+6
2017-09-23incr.comp.: Initial implemenation of append-only dep-graph.Michael Woerister-2/+1
2017-07-10incr.comp.: Cache DepNodes with corresponding query results.Michael Woerister-0/+1
2017-07-10incr.comp.: Manage dependency graph on main thread.Michael Woerister-2/+0
2017-06-09incr.comp.: Uniformly represent DepNodes as (Kind, StableHash) pairs.Michael Woerister-0/+2
2017-06-07Allocate DefIndices for global crate metadata.Michael Woerister-1/+0
This allows for treating global crate metadata the same as regular metadata with regard to incr. comp.
2017-05-08incr.comp.: Hash more pieces of crate metadata to detect changes there.Michael Woerister-0/+1
2017-05-03kill the old `visit_all_item_likes` infrastructureNiko Matsakis-2/+0
2017-05-02introduce `mir_keys()`Niko Matsakis-1/+0
Each MIR key is a DefId that has MIR associated with it
2017-03-10add comments and remove unused code pathsNiko Matsakis-1/+0
2017-03-10isolate dep-graph tasksNiko Matsakis-0/+4
A task function is now given as a `fn` pointer to ensure that it carries no state. Each fn can take two arguments, because that worked out to be convenient -- these two arguments must be of some type that is `DepGraphSafe`, a new trait that is intended to prevent "leaking" information into the task that was derived from tracked state. This intentionally leaves `DepGraph::in_task()`, the more common form, alone. Eventually all uses of `DepGraph::in_task()` should be ported to `with_task()`, but I wanted to start with a smaller subset. Originally I wanted to use closures bound by an auto trait, but that approach has some limitations: - the trait cannot have a `read()` method; since the current method is unused, that may not be a problem. - more importantly, we would want the auto trait to be "undefined" for all types *by default* -- that is, this use case doesn't really fit the typical auto trait scenario. For example, imagine that there is a `u32` loaded out of a `hir::Node` -- we don't really want to be passing that `u32` into the task!
2017-02-28add `visit_all_bodies_in_krate` helperNiko Matsakis-0/+1
2016-11-16refactor Visitor into ItemLikeVisitor and intravisit::VisitorNiko Matsakis-1/+1
There are now three patterns (shallow, deep, and nested visit). These are described in detail on the docs in `itemlikevisit::ItemLikeVisitor`.
2016-09-06implement a debugging "shadow graph"Niko Matsakis-0/+1
The shadow graph supercedes the existing code that checked for reads/writes without an active task and now adds the ability to filter for specific edges.
2016-07-28Extend DepGraph so it can track "work-products"Niko Matsakis-0/+2
A work product right now is just a `.o` file. In the future it probably includes other kinds of files, such as `.bc` files saving the unoptimized LLVM IR. However, because WorkProductIds must be independent of DefIds, so that they don't need translation, this system may not be suitable *as is* for storing fine-grained information (such as the MIR for individual defs), as it was originally intended. We will want to refactor some for that.
2016-05-18cleanup dep-graph debugging codeNiko Matsakis-0/+1
Create some re-usable filtering subroutines.
2016-05-18when encoding, push MetaData(foo) task on stackNiko Matsakis-0/+1
This lets us determine what was used to construct the metadata. Conflicts: src/librustc_metadata/encoder.rs
2016-04-06break dep-graph into modules, parameterize DepNodeNiko Matsakis-200/+6
it is useful later to customize how change the type we use for reference items away from DefId
2016-04-06rustc: move middle::{def,def_id,pat_util} to hir.Eduard Burtescu-1/+1
2016-04-06rustc: move rustc_front to rustc::hir.Eduard Burtescu-2/+2
2016-03-27rustc: move cfg, infer, traits and ty from middle to top-level.Eduard Burtescu-1/+1
2016-03-13Auto merge of #31916 - nagisa:mir-passmgr-2, r=arielb1bors-0/+2
Add Pass manager for MIR A new PR, since rebasing the original one (https://github.com/rust-lang/rust/pull/31448) properly was a pain. Since then there has been several changes most notable of which: 1. Removed the pretty-printing with `#[rustc_mir(graphviz/pretty)]`, mostly because we now have `--unpretty=mir`, IMHO that’s the direction we should expand this functionality into; 2. Reverted the infercx change done for typeck, because typeck can make an infercx for itself by being a `MirMapPass` r? @nikomatsakis
2016-03-11Forbid items with the same name being defined in overlapping inherentAaron Turon-0/+1
impl blocks. For example, the following is now correctly illegal: ```rust struct Foo; impl Foo { fn id() {} } impl Foo { fn id() {} } ``` "Overlapping" here is determined the same way it is for traits (and in fact shares the same code path): roughly, there must be some way of substituting any generic types to unify the impls, such that none of the `where` clauses are provably unsatisfiable under such a unification. Closes #22889
2016-03-04Address commentsSimonas Kazlauskas-1/+2
2016-03-04Add Pass manager for MIRSimonas Kazlauskas-0/+1
2016-03-03Rename middle::ty::ctxt to TyCtxtJeffrey Seyfried-3/+3
2016-02-24Make list of statements flatSimonas Kazlauskas-1/+1
In MIR we previously tried to match `let x in { exprs; let y in { exprs; }}` with our data structures which is rather unwieldy, espeicially because it requires some sort of recursion or stack to process, while, a flat list of statements is enough – lets only relinquish their lifetime at the end of the block (i.e. end of the list). Also fixes #31853.
2016-02-05Instrument a bunch of tasks that employ the HIR map in one way orNiko Matsakis-0/+13
another and were not previously instrumented.
2016-02-05Instrument the AST map so that it registers reads when data isNiko Matsakis-0/+7
acccessed.
2016-01-19remove the `SimplifiedType` from the `DepNode` for now, just to keepNiko Matsakis-2/+1
size of `DepNode` smaller and because we are not that fine-grained yet anyhow
2016-01-06Fix numerous typos, renamings, and minor nits raised by mw.Niko Matsakis-1/+1
2016-01-05Introduce the DepGraph and DepTracking map abstractions,Niko Matsakis-0/+196
along with a README explaining how they are to be used