Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up[WIP] [MIR] Generic lattice-based dataflow framework, rebased #34164
Conversation
nagisa
and others
added some commits
May 14, 2016
rust-highfive
assigned
Aatch
Jun 8, 2016
This comment has been minimized.
This comment has been minimized.
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Aatch (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Also, mutable updates of original block are somewhat incompatible with my plans to make it possible to replace any statement with an arbitrary subgraph, which is why I used to create a new block and then swap in the first place. |
This comment has been minimized.
This comment has been minimized.
|
I don't think mutable updates are necessarily incompatible with replacement by an arbitrary subgraph - the design I was envisioning was for the |
This comment has been minimized.
This comment has been minimized.
|
Note that although Travis passed, the debuginfo tests, which Travis skips, failed locally. |
gereeter
added some commits
Jun 8, 2016
This comment has been minimized.
This comment has been minimized.
|
|
luqmana
reviewed
Jun 10, 2016
|
|
||
| struct AcsPropagateTransfer; | ||
|
|
||
| fn base_lvalue<'a, 'tcx>(mut lval: &'a Lvalue<'tcx>) -> &'a Lvalue<'tcx> { |
This comment has been minimized.
This comment has been minimized.
luqmana
Jun 10, 2016
Member
It'd be reasonable to just add this as a method on Lvalue since other transformations will almost certainly find it useful as well.
This comment has been minimized.
This comment has been minimized.
|
Does this effectively implement part of #32966? |
This comment has been minimized.
This comment has been minimized.
|
@pcwalton yes. |
This comment has been minimized.
This comment has been minimized.
|
@gereeter I’m essentially done with my schoolwork now so I’ll be fetching your PR and begin working onto it. Thanks for your contribution! |
arielb1
reviewed
Jun 16, 2016
| @@ -72,11 +72,11 @@ fn retain_basic_blocks(mir: &mut Mir, keep: &BitVector) { | |||
| if alive_index != used_blocks { | |||
| // Swap the next alive block data with the current available slot. Since alive_index is | |||
| // non-decreasing this is a valid operation. | |||
| mir.basic_blocks.swap(alive_index, used_blocks); | |||
| mir.cfg.basic_blocks.swap(alive_index, used_blocks); | |||
This comment has been minimized.
This comment has been minimized.
arielb1
Jun 16, 2016
Contributor
I prefer having RemoveDeadBlocks being a "GC" pass and doing the swapping "manually", with other passes not removing BBs.
This comment has been minimized.
This comment has been minimized.
|
@nagisa @gereeter what is status of this PR, and which optimizations does it implement? I haven't had a chance to look at it yet (I admit, I was kind of waiting until @nagisa was around again, just because of lack of time...) but I'd like to try and do so now (though I'm also sort of on vacation -- trying to at least keep up with PRs though). But I see some comments suggesting that @nagisa may be opening another version? |
This comment has been minimized.
This comment has been minimized.
|
My own most up-to-date branch is here. It is based on this PR, so if you’re looking at anything, my suggestion is to look at that.
This PR cannot be merged as is. It does not differ very much from what I envision the thing will become in the end, though, so it certainly should be fine to do a shallow review to get familiar with the approach if there’s a desire to do so. My goal is to have forward move propagation and constant propagation passes implemented as a showcase of the framework (@greeter spent a lot of time making sure they are correct). This PR has those two passes implemented, but they still don’t quite work (or shouldn’t work) due to missing cleanup (liveness pass) and speculative analysis support (what @arielb1 noticed was missing during their review of the PR). Ultimately, given this cannot be merged, is out of date and is way past the request-for-comments date (since I’m actively working on it again), I suggest to close this PR. |
This comment has been minimized.
This comment has been minimized.
OK. |
gereeter commentedJun 8, 2016
This is a rebased and extended version of @nagisa's #33628. It could still do with at least cleanup and optimization, and there are extensions and changes that @nagisa has planned and that I have planned. However, I believe that I have fixed any bugs it causes, and this version successfully bootstraps locally.