Add an opt-in to store incoming edges in VecGraph + misc#123980
Merged
bors merged 4 commits intorust-lang:masterfrom Apr 19, 2024
Merged
Add an opt-in to store incoming edges in VecGraph + misc#123980bors merged 4 commits intorust-lang:masterfrom
VecGraph + misc#123980bors merged 4 commits intorust-lang:masterfrom
Conversation
Collaborator
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in coverage instrumentation. cc @Zalathar |
VecGraph + misc
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.
451c3cb to
fa134b5
Compare
wesleywiser
approved these changes
Apr 17, 2024
| // similarly to its successors but offsetting by `edge_count`. `edge_count` is | ||
| // `edge_targets.len()/2` (again, in case BR is true) because half of the vec is back refs. | ||
| // | ||
| // All of this might be confusing, so here is an example graph and its representation: |
| use rustc_index::{Idx, IndexVec}; | ||
|
|
||
| #[cfg(test)] | ||
| mod tests; |
Member
There was a problem hiding this comment.
nit: could you add a basic test or two for the predecessors functionality? (I think you also need to update some of the existing tests to compile with the extra generic parameter) 🙂
Member
Author
There was a problem hiding this comment.
I did not need to update existing tests, since the new generic parameter has a default.
I added a test for predecessors + added predecessor-aware mode for existing tests (so that we are more sure that enabling predecessors doesn't break other stuff).
Member
Author
|
@bors r=wesleywiser rollup=always |
Collaborator
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Apr 18, 2024
…r, r=wesleywiser Add an opt-in to store incoming edges in `VecGraph` + misc r? `@fmease` needed for rust-lang#123939
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Apr 18, 2024
…r, r=wesleywiser Add an opt-in to store incoming edges in `VecGraph` + misc r? ``@fmease`` needed for rust-lang#123939
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this pull request
Apr 18, 2024
…r, r=wesleywiser Add an opt-in to store incoming edges in `VecGraph` + misc r? `@fmease` needed for rust-lang#123939
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 18, 2024
…kingjubilee Rollup of 6 pull requests Successful merges: - rust-lang#117919 (Introduce perma-unstable `wasm-c-abi` flag) - rust-lang#123571 (Correctly change type when adding adjustments on top of `NeverToAny`) - rust-lang#123752 (Properly handle emojis as literal prefix in macros) - rust-lang#123980 ( Add an opt-in to store incoming edges in `VecGraph` + misc) - rust-lang#124110 (Fix negating `f16` and `f128` constants) - rust-lang#124116 (when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation) r? `@ghost` `@rustbot` modify labels: rollup
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this pull request
Apr 18, 2024
…r, r=wesleywiser Add an opt-in to store incoming edges in `VecGraph` + misc r? ``@fmease`` needed for rust-lang#123939
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 19, 2024
…kingjubilee Rollup of 9 pull requests Successful merges: - rust-lang#117919 (Introduce perma-unstable `wasm-c-abi` flag) - rust-lang#123406 (Force exhaustion in iter::ArrayChunks::into_remainder) - rust-lang#123752 (Properly handle emojis as literal prefix in macros) - rust-lang#123935 (Don't inline integer literals when they overflow - new attempt) - rust-lang#123980 ( Add an opt-in to store incoming edges in `VecGraph` + misc) - rust-lang#124019 (Use raw-dylib for Windows synchronization functions) - rust-lang#124110 (Fix negating `f16` and `f128` constants) - rust-lang#124112 (Fix ICE when there is a non-Unicode entry in the incremental crate directory) - rust-lang#124116 (when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 19, 2024
…kingjubilee Rollup of 7 pull requests Successful merges: - rust-lang#123406 (Force exhaustion in iter::ArrayChunks::into_remainder) - rust-lang#123752 (Properly handle emojis as literal prefix in macros) - rust-lang#123935 (Don't inline integer literals when they overflow - new attempt) - rust-lang#123980 ( Add an opt-in to store incoming edges in `VecGraph` + misc) - rust-lang#124019 (Use raw-dylib for Windows synchronization functions) - rust-lang#124110 (Fix negating `f16` and `f128` constants) - rust-lang#124116 (when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 19, 2024
Rollup merge of rust-lang#123980 - WaffleLapkin:graph-average-refactor, r=wesleywiser Add an opt-in to store incoming edges in `VecGraph` + misc r? ```@fmease``` needed for rust-lang#123939
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 2, 2024
…int, r=compiler-errors Add a lint against never type fallback affecting unsafe code ~~I'm not very happy with the code quality... `VecGraph` not allowing you to get predecessors is very annoying. This should work though, so there is that.~~ (ended up updating `VecGraph` to support getting predecessors) ~~First few commits are from rust-lang#123934 rust-lang#123980
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
r? @fmease
needed for #123939