about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/graph/iterate
AgeCommit message (Collapse)AuthorLines
2025-01-16coverage: Completely overhaul counter assignment, using node-flow graphsZalathar-0/+10
2025-01-11rename `BitSet` to `DenseBitSet`Rémy Rakic-7/+7
This should make it clearer that this bitset is dense, with the advantages and disadvantages that it entails.
2024-07-29Reformat `use` declarations.Nicholas Nethercote-3/+4
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-05-30Apply x clippy --fix and x fmtr0cky-2/+2
2024-04-15Make `graph::DepthFirstSearch` accept `G` by valueMaybe Waffle-11/+11
It's required for the next commit. Note that you can still have `G = &H`, since there are implementations of all the graph traits for references.
2024-04-14Rename `WithNumEdges` => `NumEdges` and `WithStartNode` => `StartNode`Maybe Waffle-2/+2
2024-04-14Merge `{With,Graph}{Successors,Predecessors}` into `{Successors,Predecessors}`Maybe Waffle-12/+12
Now with GAT!
2024-04-14Merge `WithNumNodes` into DirectedGraphMaybe Waffle-12/+12
2023-04-24Split `{Idx, IndexVec, IndexSlice}` into their own modulesMaybe Waffle-1/+1
2023-04-02Use `&IndexSlice` instead of `&IndexVec` where possibleScott McMurray-2/+2
All the same reasons as for `[T]`: more general, less pointer chasing, and `&mut IndexSlice` emphasizes that it doesn't change *length*.
2023-01-17Stop using `BREAK` & `CONTINUE` in compilerScott McMurray-4/+4
Switching them to `Break(())` and `Continue(())` instead. libs-api would like to remove these constants, so stop using them in compiler to make the removal PR later smaller.
2021-12-05Stop enabling `in_band_lifetimes` in rustc_data_structuresScott McMurray-3/+3
There's a conversation in the tracking issue about possibly unaccepting `in_band_lifetimes`, but it's used heavily in the compiler, and thus there'd need to be a bunch of PRs like this if that were to happen. So here's one to see how much of an impact it has. (Oh, and I removed `nll` while I was here too, since it didn't seem needed. Let me know if I should put that back.)
2021-10-15Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, ↵Matthias Krüger-2/+2
r=petrochenkov" The PR had some unforseen perf regressions that are not as easy to find. Revert the PR for now. This reverts commit 6ae8912a3e7d2c4c775024f58a7ba4b1aedc4073, reversing changes made to 86d6d2b7389fe1b339402c1798edae8b695fc9ef.
2021-10-10Apply clippy suggestionsClemens Wasser-2/+2
2021-09-08Rework DepthFirstSearch APINiko Matsakis-2/+68
This expands the API to be more flexible, allowing for more visitation patterns on graphs. This will be useful to avoid extra datasets (and allocations) in cases where the expanded DFS API is sufficient. This also fixes a bug with the previous DFS constructor, which left the start node not marked as visited (even though it was immediately returned).
2020-12-18Switch compiler/ to intra-doc linksJoshua Nelson-2/+0
rustc_lint and rustc_lint_defs weren't switched because they're included in the compiler book and so can't use intra-doc links.
2020-10-31Move post order walk to iterative approachAndreas Molzer-5/+20
The previous recursive approach might overflow the stack when walking a particularly deep, list-like, graph. In particular, dominator calculation for borrow checking does such a traversal and very long functions might lead to a region dependency graph with in this problematic structure.
2020-10-22Don't re-export std::ops::ControlFlow in the compiler.Leonora Tindall-3/+1
2020-10-22change the order of type arguments on ControlFlowLeonora Tindall-2/+1
This allows ControlFlow<BreakType> which is much more ergonomic for common iterator combinator use cases.
2020-09-04Add `BREAK` too, and improve the commentsScott McMurray-1/+1
2020-09-04Use ops::ControlFlow in graph::iterateScott McMurray-8/+5
2020-08-30mv compiler to compiler/mark-0/+318