about summary refs log tree commit diff
path: root/src/librustc_data_structures/graph/mod.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-86/+0
2019-12-22Format the worldMark Rousskov-11/+4
2019-09-29remove indexed_vec re-export from rustc_data_structurescsmoe-1/+1
2019-09-23Add cycle detection for graphsDylan MacKenzie-0/+10
2019-08-02librustc_data_structures: Unconfigure tests during normal buildVadim Petrochenkov-1/+1
2019-07-28Deny `unused_lifetimes` through rustbuildVadim Petrochenkov-0/+2
2019-07-03Remove needless lifetimesJeremy Stucki-6/+6
2019-07-02add a `depth_first_search` helper functionNiko Matsakis-0/+7
2019-07-02introduce a `VecGraph` abstraction that cheaply stores graphsNiko Matsakis-0/+5
This is perhaps better than the linked list approach I was using before. Lower memory overhead, Theta(N+E) storage. Does require a sort. =)
2018-12-25Remove licensesMark Rousskov-10/+0
2018-07-12introduce a generic SCC computationNiko Matsakis-0/+1
2018-07-12rename `control_flow_graph` to `graph`Niko Matsakis-0/+78
2018-07-12rename `graph` to `control_flow_graph::implementation`Niko Matsakis-417/+0
2018-03-20Implement some trivial size_hints for various iteratorsPhlosioneer-0/+13
This also implements ExactSizeIterator where applicable. Addresses most of the Iterator traits mentioned in #23708.
2018-03-07Run rustfmt on `src/librustc_data_structures/graph/mod.rs`.Corey Farwell-24/+29
2018-03-07Replace iterator structures with `impl Trait`.Corey Farwell-77/+25
2017-10-09Refactor to use `debug_struct` in several Debug implsMalo Jaffré-13/+2
Fixes #44771.
2017-09-14rustc: Preallocate when building the dep graphAlex Crichton-0/+7
This commit alters the `query` function in the dep graph module to preallocate memory using `with_capacity` instead of relying on automatic growth. Discovered in #44576 it was found that for the syntex_syntax clean incremental benchmark the peak memory usage was found when the dep graph was being saved, particularly the `DepGraphQuery` data structure itself. PRs like #44142 which add more queries end up just making this much larger! I didn't see an immediately obvious way to reduce the size of the `DepGraphQuery` object, but it turns out that `with_capacity` helps quite a bit! Locally 831 MB was used [before] this commit, and 770 MB is in use at the peak of the compiler [after] this commit. That's a nice 7.5% improvement! This won't quite make up for the losses in #44142 but I figured it's a good start. [before]: https://gist.github.com/alexcrichton/2d2b9c7a65503761925c5a0bcfeb0d1e [before]: https://gist.github.com/alexcrichton/6da51f2a6184bfb81694cc44f06deb5b
2017-08-19rustc: Remove some dead codeVadim Petrochenkov-109/+0
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-11/+11
Like #43008 (f668999), but _much more aggressive_.
2017-08-07rustc::middle::dataflow - visit the CFG in RPOAriel Ben-Yehuda-0/+36
We used to propagate bits in node-id order, which sometimes caused an excessive number of iterations, especially when macros were present. As everyone knows, visiting the CFG in RPO bounds the number of iterators by 1 plus the depth of the most deeply nested loop (times the height of the lattice, which is 1). Fixes #43704.
2016-11-02Added Graph::is_cyclicic_node algorithmHavvy-11/+40
2016-11-02Change Make comment into doc comment on Graph::iterate_until_fixed_pointHavvy-8/+5
2016-11-02Added general iterators for graph nodes and edgesHavvy-4/+44
Also used those general iterators in other methods.
2016-11-01Normalize generic bounds in graph iteratorsHavvy-3/+6
Use where clasues and only where clauses for bounds in the iterators for Graph. The rest of the code uses bounds on the generic declarations for Debug, and we may want to change those to for consistency. I did not do that here because I don't know whether or not that's a good idea. But for the iterators, they were inconsistent causing confusion, at least for me.
2016-10-20run rustfmt on graph folderSrinivas Reddy Thatiparthy-2/+2
2016-08-09isolate predecessor computationNiko Matsakis-18/+44
The new `Predecessors` type computes a set of interesting targets and their HIR predecessors, and discards everything in between.
2016-05-18identify inputs of `MetaData(X)` nodesNiko Matsakis-4/+10
Generate a second hash file that contains the metadata for an X node.
2016-03-05adopt new header style to sidestep rust-lang-nursery/rustfmt#836Niko Matsakis-12/+6
2016-03-05apply rustfmt to librustc_data_structures, correcting ↵Niko Matsakis-53/+65
rust-lang-nursery/rustfmt#836
2016-02-18Remove unnecessary explicit lifetime bounds.Corey Farwell-10/+10
These explicit lifetimes can be ommitted because of lifetime elision rules. Instances were found using rust-clippy.
2016-01-05Introduce the DepGraph and DepTracking map abstractions,Niko Matsakis-3/+11
along with a README explaining how they are to be used
2015-09-06add a few accessors to GraphNiko Matsakis-0/+10
2015-06-19Expand the "givens" set to cover transitive relations. The givens arrayNiko Matsakis-3/+3
stores relationships like `'c <= '0` (where `'c` is a free region and `'0` is an inference variable) that are derived from closure arguments. These are (rather hackily) ignored for purposes of inference, preventing spurious errors. The current code did not handle transitive cases like `'c <= '0` and `'0 <= '1`. Fixes #24085.
2015-04-24Change name of unit test sub-module to "tests".Johannes Oertel-1/+1
Changes the style guidelines regarding unit tests to recommend using a sub-module named "tests" instead of "test" for unit tests as "test" might clash with imports of libtest.
2015-04-17Port to using the newer graph, which offers iterators instead of theNiko Matsakis-0/+403
older `each` method, but is otherwise identical.