-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Remove support for SwitchInt edge effects in backward dataflow #143769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+7
−48
Conversation
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
Fix a mix-up of a block with its predecessors in handling of SwitchInt edge effects for backward analysis. Note that this functionality is currently unused, so change has no practical impact.
lqd
approved these changes
Jul 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. This partial support has confused me before when reading the dataflow engine code.
r=me with comment nit
Those effects are untested and unused. Remove them along with the implementation of `BasicBlocks::switch_sources`.
f53b73f
to
5b6d661
Compare
r? lqd @bors r+ rollup |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jul 11, 2025
Remove support for SwitchInt edge effects in backward dataflow Those effects are untested and unused. Remove them along with the implementation of `BasicBlocks::switch_sources`.
bors
added a commit
that referenced
this pull request
Jul 11, 2025
Rollup of 10 pull requests Successful merges: - #142301 (tests: Fix duplicated-path-in-error fail with musl) - #143403 (Port several trait/coherence-related attributes the new attribute system) - #143633 (fix: correct assertion to check for 'noinline' attribute presence before removal) - #143647 (Clarify and expand documentation for std::sys_common dependency structure) - #143716 (compiler: doc/comment some codegen-for-functions interfaces) - #143747 (Add target maintainer information for aarch64-unknown-linux-musl) - #143759 (Fix typos in function names in the `target_feature` test) - #143767 (Bump `src/tools/x` to Edition 2024 and some cleanups) - #143769 (Remove support for SwitchInt edge effects in backward dataflow) - #143770 (build-helper: clippy fixes) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
that referenced
this pull request
Jul 12, 2025
Rollup of 9 pull requests Successful merges: - #143403 (Port several trait/coherence-related attributes the new attribute system) - #143633 (fix: correct assertion to check for 'noinline' attribute presence before removal) - #143647 (Clarify and expand documentation for std::sys_common dependency structure) - #143716 (compiler: doc/comment some codegen-for-functions interfaces) - #143747 (Add target maintainer information for aarch64-unknown-linux-musl) - #143759 (Fix typos in function names in the `target_feature` test) - #143767 (Bump `src/tools/x` to Edition 2024 and some cleanups) - #143769 (Remove support for SwitchInt edge effects in backward dataflow) - #143770 (build-helper: clippy fixes) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Jul 12, 2025
Rollup merge of #143769 - tmiasko:rm-backward-switch-int, r=lqd Remove support for SwitchInt edge effects in backward dataflow Those effects are untested and unused. Remove them along with the implementation of `BasicBlocks::switch_sources`.
rust-bors bot
added a commit
that referenced
this pull request
Jul 12, 2025
Collect `SwitchInt` target `VariantIdx`s while building `MaybePlacesSwitchIntData` - Filter discriminants involved in a `SwitchInt` and map their values to `VariantIdx` while building `MaybePlacesSwitchIntData` instead of in `apply_effects_in_block` using `next_discr`. This is easier after #143769. - Use that `Vec` when handling the `otherwise` target instead of making a new `SmallVec`. This could make `MaybeInitializedPlaces`/`MaybeUninitializedPlaces` analysis slightly more efficient, particularly after #142707.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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.
Those effects are untested and unused. Remove them along with the implementation of
BasicBlocks::switch_sources
.