-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Conversation
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
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.
Looks basically correct to me!
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) { |
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.
seems correct
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Now waiting for changes to land in Polonius: rust-lang/polonius#105 |
Hopefully not WIP anymore now that rust-lang/polonius#104 is merged! |
☔ The latest upstream changes (presumably #61506) made this pull request unmergeable. Please resolve the merge conflicts. |
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! |
☔ The latest upstream changes (presumably #61817) made this pull request unmergeable. Please resolve the merge conflicts. |
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™. |
@bors r+ |
Just in case bors ignores commands on S-waiting-on-author: @bors r=nikomatsakis |
@bors r=nikomatsakis |
📌 Commit 0612a666cd6529cd7a351a8f5d5697f45b2a126e has been approved by |
This comment has been minimized.
This comment has been minimized.
Notably contains an ugly hack to generate initialization information for variables that will go away when we have that functionality in Polonius.
Rebase is done @bors r=nikomatsakis |
📌 Commit 9d3c59d has been approved by |
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).
☀️ Test successful - checks-azure, checks-travis, status-appveyor |
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.