Skip to content
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

Implement apply_switch_int_edge_effects for backward analyses #95120

Merged
merged 3 commits into from
Mar 28, 2022

Conversation

smoelius
Copy link
Contributor

See #94576 for some discussion.

r? @ecstatic-morse

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 19, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 19, 2022
Copy link
Contributor

@ecstatic-morse ecstatic-morse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation looks good for the most part. Left a few comments. When there's a pass that actually uses this it would be good to add a peek test to ensure that it computes the correct results.

* Add lazily computed `switch_sources` data structure
* Don't assume a target has only one associated value
@smoelius smoelius force-pushed the backward-switch-int branch from 848a49b to 37ebd47 Compare March 26, 2022 13:12
@smoelius smoelius changed the title Implement apply_switch_int_edge_effect for backward analyses Implement apply_switch_int_edge_effects for backward analyses Mar 26, 2022
@smoelius
Copy link
Contributor Author

@ecstatic-morse I think 37ebd47 addresses your comments and the bug that I found.

@ecstatic-morse
Copy link
Contributor

LGTM. Hopefully this is useful to you.

Now that we have 3 different cached computations on MIR bodies with the same implementation, we probably want some sort of generalized framework.

@ecstatic-morse
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Mar 27, 2022

📌 Commit 241ec5b has been approved by ecstatic-morse

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 27, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 27, 2022
Rollup of 5 pull requests

Successful merges:

 - rust-lang#94939 (diagnostics: suggest missing comma in bad FRU syntax)
 - rust-lang#95120 (Implement `apply_switch_int_edge_effects` for backward analyses)
 - rust-lang#95364 (Add long error explanation for E0667)
 - rust-lang#95366 (Remove test files with duplicated checksums)
 - rust-lang#95368 (Fix typo in `String::try_reserve_exact` docs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a8be562 into rust-lang:master Mar 28, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 28, 2022
@smoelius smoelius deleted the backward-switch-int branch March 28, 2022 08:48
@JakobDegen JakobDegen mentioned this pull request May 7, 2022
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants