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

Fact generation for liveness calculations in Polonius #60266

Merged
merged 3 commits into from
Jul 13, 2019
Merged

Fact generation for liveness calculations in Polonius #60266

merged 3 commits into from
Jul 13, 2019

Conversation

amandasystems
Copy link
Contributor

This PR tracks ongoing work to extend rustc with support for generating variable use, definition, and later also drop output for the Polonius solver, the whole of which is being tracked in Polonius Issue #104.

@rust-highfive
Copy link
Collaborator

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 25, 2019
@amandasystems
Copy link
Contributor Author

r? @nikomatsakis

@rust-highfive rust-highfive assigned nikomatsakis and unassigned eddyb Apr 25, 2019
@rust-highfive

This comment has been minimized.

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

Looks basically correct to me!

@nikomatsakis nikomatsakis added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 30, 2019
@nikomatsakis
Copy link
Contributor

Marking as "waiting on author", as we're waiting on @AlbinS to do some of the next steps.

@@ -27,14 +27,21 @@ impl LivenessFactsExtractor<'_> {
.var_used
.push((local, self.location_to_index(location)));
}

fn insert_drop(&mut self, local: Local, location: Location) {
Copy link
Contributor

Choose a reason for hiding this comment

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

seems correct

@rust-highfive

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@bors

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@amandasystems
Copy link
Contributor Author

Now waiting for changes to land in Polonius: rust-lang/polonius#105

@amandasystems amandasystems changed the title [WIP] Fact generation for liveness calculations in Polonius Fact generation for liveness calculations in Polonius Jun 7, 2019
@amandasystems
Copy link
Contributor Author

Hopefully not WIP anymore now that rust-lang/polonius#104 is merged!

@lqd lqd added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 7, 2019
@bors
Copy link
Contributor

bors commented Jun 10, 2019

☔ The latest upstream changes (presumably #61506) made this pull request unmergeable. Please resolve the merge conflicts.

@amandasystems
Copy link
Contributor Author

We have decided to do preliminary work on integrating initializiation tracking as well before merging this in order to get (hopefully) exactly the same output as rustc from Polonius, so back to WIP!

@amandasystems amandasystems changed the title Fact generation for liveness calculations in Polonius [WIP] Fact generation for liveness calculations in Polonius Jun 12, 2019
@lqd lqd added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 12, 2019
@bors
Copy link
Contributor

bors commented Jun 14, 2019

☔ The latest upstream changes (presumably #61817) made this pull request unmergeable. Please resolve the merge conflicts.

@amandasystems
Copy link
Contributor Author

This branch now has preliminary liveness calculations that uses a hack to extract initialisation status, which is needed for correct drop-liveness calculations. When we have initialisation tracking in Polonius that hack will go away, but for now and to the best of our knowledge these inputs compute exactly the same region liveness tuples as rustc previously generated, including for tricky edge cases™.

@amandasystems amandasystems changed the title [WIP] Fact generation for liveness calculations in Polonius Fact generation for liveness calculations in Polonius Jul 9, 2019
@nikomatsakis
Copy link
Contributor

@bors r+

@lqd lqd removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 12, 2019
@lqd
Copy link
Member

lqd commented Jul 12, 2019

Just in case bors ignores commands on S-waiting-on-author:

@bors r=nikomatsakis

@pietroalbini
Copy link
Member

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Jul 12, 2019

📌 Commit 0612a666cd6529cd7a351a8f5d5697f45b2a126e has been approved by nikomatsakis

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 12, 2019
@bors

This comment has been minimized.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 12, 2019
Albin Stjerna added 3 commits July 12, 2019 22:41
Notably contains an ugly hack to generate initialization information for
variables that will go away when we have that functionality in Polonius.
@lqd
Copy link
Member

lqd commented Jul 13, 2019

Rebase is done

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Jul 13, 2019

📌 Commit 9d3c59d has been approved by nikomatsakis

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 13, 2019
@bors
Copy link
Contributor

bors commented Jul 13, 2019

⌛ Testing commit 9d3c59d with merge 6b468c6...

bors added a commit that referenced this pull request Jul 13, 2019
Fact generation for liveness calculations in Polonius

This PR tracks ongoing work to extend `rustc` with support for generating variable use, definition, and later also drop output for the Polonius solver, the whole of which is being tracked in [Polonius Issue #104](rust-lang/polonius#104).
@bors
Copy link
Contributor

bors commented Jul 13, 2019

☀️ Test successful - checks-azure, checks-travis, status-appveyor
Approved by: nikomatsakis
Pushing 6b468c6 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 13, 2019
@bors bors merged commit 9d3c59d into rust-lang:master Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants