about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/graph
AgeCommit message (Collapse)AuthorLines
2023-12-10remove redundant importssurechen-1/+0
detects redundant imports that can be eliminated. for #117772 : In order to facilitate review and modification, split the checking code and removing redundant imports code into two PR.
2023-11-28Avoid an unnecessary `by_ref`.Nicholas Nethercote-1/+1
2023-11-22Replace `no_ord_impl` with `orderable`.Nicholas Nethercote-0/+1
Similar to the previous commit, this replaces `newtype_index`'s opt-out `no_ord_impl` attribute with the opt-in `orderable` attribute.
2023-10-10Remove unused dominator iteratorTomasz Miąsko-26/+1
2023-10-05Optimize dominators for small path graphsTomasz Miąsko-10/+65
Generalizes the small dominators approach from #107449.
2023-10-05Remove redundant Dominators::start_node fieldTomasz Miąsko-3/+2
2023-10-05Test immediate dominators using public APITomasz Miąsko-24/+21
2023-09-18coverage: Simplify sorting of coverage spans extracted from MIRZalathar-3/+3
Switching to `Ordering::then_with` makes control-flow less complicated, and there is no need to use `partial_cmp` here.
2023-08-28don't use SnapshotVec in Graph implementation, as it looks unused; use Vec ↵klensy-19/+4
instead
2023-07-12Re-format let-else per rustfmt updateMark Rousskov-3/+1
2023-05-24Auto merge of #111673 - cjgillot:dominator-preprocess, r=cjgillot,tmiaskobors-10/+85
Preprocess and cache dominator tree Preprocessing dominators has a very strong effect for https://github.com/rust-lang/rust/pull/111344. That pass checks that assignments dominate their uses repeatedly. Using the unprocessed dominator tree caused a quadratic runtime (number of bbs x depth of the dominator tree). This PR also caches the dominator tree and the pre-processed dominators in the MIR cfg cache. Rebase of https://github.com/rust-lang/rust/pull/107157 cc `@tmiasko`
2023-05-18Revert spurious changes.Camille GILLOT-9/+9
2023-05-17Merge DominatorTree and Dominators.Camille GILLOT-36/+30
2023-05-17Typo.Camille GILLOT-1/+1
2023-05-17Remove outdated comment.Camille GILLOT-2/+0
2023-05-17Preprocess dominator tree to answer queries in O(1)Tomasz Miąsko-22/+105
2023-05-15Process current bucket instead of parent's bucket when starting loop for ↵Camille GILLOT-8/+35
dominators.
2023-05-14Start node has no immediate dominatorTomasz Miąsko-14/+22
Change the immediate_dominator return type to Option, and use None to indicate that node has no immediate dominator. Also fix the issue where the start node would be returned as its own immediate dominator.
2023-04-24Split `{Idx, IndexVec, IndexSlice}` into their own modulesMaybe Waffle-5/+6
2023-04-09Fix some clippy::complexityNilstrieb-8/+2
2023-04-02Use `&IndexSlice` instead of `&IndexVec` where possibleScott McMurray-12/+12
All the same reasons as for `[T]`: more general, less pointer chasing, and `&mut IndexSlice` emphasizes that it doesn't change *length*.
2023-03-21Add `-Z time-passes-format` to allow specifying a JSON output for `-Z ↵John Kåre Alsaker-6/+6
time-passes`
2023-02-21address reviewb-naber-4/+20
2023-02-19sccs infob-naber-5/+5
2023-01-24Improve efficiency of has_back_edge(...)Bryan Garza-0/+7
2023-01-23Add comment on cause of panic in dominators algorithmBryan Garza-1/+41
2023-01-23Rollup merge of #107153 - tmiasko:dominates, r=oli-obkYuki Okushi-1/+1
Consistently use dominates instead of is_dominated_by There is a number of APIs that answer dominance queries. Previously they were named either "dominates" or "is_dominated_by". Consistently use the "dominates" form. No functional changes.
2023-01-21Consistently use dominates instead of is_dominated_byTomasz Miąsko-1/+1
There is a number of APIs that answer dominance queries. Previously they were named either "dominates" or "is_dominated_by". Consistently use the "dominates" form. No functional changes.
2023-01-21Auto merge of #106976 - tmiasko:borrowck-lazy-dominators, r=cjgillotbors-4/+0
Lazy dominator tree construction in borrowck Motivated by the observation that sometimes constructed dominator tree was never queried.
2023-01-20Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstriebbors-4/+4
Remove some `ref` patterns from the compiler Previous PR: https://github.com/rust-lang/rust/pull/105368 r? `@Nilstrieb`
2023-01-19Rollup merge of #107037 - tmiasko:rank, r=oli-obkGuillaume Gomez-1/+1
Fix Dominators::rank_partial_cmp to match documentation The only use site is also updated accordingly and there is no change in end-to-end behaviour.
2023-01-18Fix Dominators::rank_partial_cmp to match documentationTomasz Miąsko-1/+1
The only use site is also updated accordingly and there is no change in end-to-end behaviour.
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.
2023-01-17Lazy dominator tree construction in borrowckTomasz Miąsko-4/+0
Motivated by the observation that sometimes constructed dominator tree was never queried.
2023-01-17Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726Matthias Krüger-1/+1
Remove double spaces after dots in comments Most of the comments do not have double spaces, so I assume these are typos.
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-1/+1
2023-01-17`rustc_data_structures`: remove `ref` patterns and other artifacts of the pastMaybe Waffle-4/+4
2023-01-16Document wf constraints on control flow in cleanup blocksJakob Degen-1/+4
Also fixes a bug in dominator computation
2023-01-05Fix `uninlined_format_args` for some compiler cratesnils-10/+8
Convert all the crates that have had their diagnostic migration completed (except save_analysis because that will be deleted soon and apfloat because of the licensing problem).
2022-12-18A few small cleanups for `newtype_index`Nilstrieb-1/+1
Remove the `..` from the body, only a few invocations used it and it's inconsistent with rust syntax. Use `;` instead of `,` between consts. As the Rust syntax gods inteded.
2022-12-10compiler: remove unnecessary imports and qualified pathsKaDiWa-3/+0
2022-10-14more dupe word typosRageking8-2/+2
2022-06-04Adapt rustc_data_structures tests to run in strict miriNilstrieb-0/+3
Some tests took too long and owning_ref is fundamentally flawed, so don't run these tests or run them with a shorter N. This makes miri with `-Zmiri-strict-provenance` usable to find UB.
2022-02-23Avoid exhausting stack space in dominator compressionMark Rousskov-3/+13
2021-12-22rustc `VecGraph`: require the index type to implement Ordpierwill-6/+9
2021-12-22Remove `PartialOrd` and `Ord` from `LocalDefId`pierwill-1/+1
Implement `Ord`, `PartialOrd` for SpanData
2021-12-06Annotate comments onto the LT algorithmMark Rousskov-2/+102
2021-12-06Avoid using Option where values are always SomeMark Rousskov-9/+13
2021-12-06Create newtype around the pre order indexMark Rousskov-32/+41
2021-12-06Use variables rather than lengths directlyMark Rousskov-10/+13