Skip to content

Conversation

@amandasystems
Copy link
Contributor

This is a work in progress on issue #104.

Sorry for the poorly named branch; I started it to fix a silly compiler warning and ended up using it for the implementation.

@amandasystems
Copy link
Contributor Author

amandasystems commented Mar 28, 2019

The current version seems to work, but I am not happy about generating an entire new Relation for walking the control-flow graph backwards.

I haven't yet written extensive tests, but I think it makes some sort of sense to go ahead with the extensions to rustc to produce the new facts so as to have some sort of ability to generate input data.

Additionally, I am unsure how to handle a possible off by one situation when doing CFG traversal. In particular, is there a difference between considering a variable as dead or alive in the point where the assignment ("death") happens? I am even unsure of what I am doing now, but I think the correct way would be to have the variable die after assignment, while being alive at the assignment, but I don't know enough about Miri to know if this ever becomes a problem. If calculations of values used in assignments always happens in a point before the assignment itself both variants should be equivalent, right? Or are the points mapped to actual Rust lines of code?

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.

I think everything up to this point looks good, IIRC. (I didn't do a detailed re-read.) As we noted elsewhere, creating a new relation to invert the CFG is just how datafrog works -- we need to re-index by the reverse edge, essentially.

@amandasystems amandasystems changed the title [WIP] Implement liveness computation Implement liveness computation Apr 23, 2019
@amandasystems amandasystems changed the title Implement liveness computation [WIP] Implement liveness computation May 2, 2019
@amandasystems
Copy link
Contributor Author

This is marked WIP again as I might as well roll the entire region logic into this PR as per #104.

@amandasystems amandasystems changed the title [WIP] Implement liveness computation Implement liveness computation May 28, 2019
@nikomatsakis nikomatsakis self-assigned this Jun 3, 2019
Albin Stjerna added 2 commits June 4, 2019 21:19
Also: add .DS_Store to .gitignore (sorry, Mac user), and a *very* simple shell
script for regneerating facts because I got tired of doing it by hand.
@nikomatsakis nikomatsakis merged commit 3f122af into rust-lang:master Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants