diff options
author | Michal Terepeta <michal.terepeta@gmail.com> | 2016-11-29 17:54:12 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-11-29 18:46:33 -0500 |
commit | 679ccd1c8860f1ef4b589c9593b74d04c97ae836 (patch) | |
tree | 1f02c6ddcac9448d91346c57e889be04976f2dc4 /testsuite/mk | |
parent | b92f8e38b1d58bef55b4fec67c1f0807e960512d (diff) | |
download | haskell-679ccd1c8860f1ef4b589c9593b74d04c97ae836.tar.gz |
Hoopl/Dataflow: use block-oriented interface
This introduces the new interface for dataflow analysis, where transfer
functions operate on a whole basic block.
The main changes are:
- Hoopl.Dataflow: implement the new interface and remove the old code;
expose a utility function to do a strict fold over the nodes of a
basic block (for analyses that do want to look at all the nodes)
- Refactor all the analyses to use the new interface.
One of the nice effects is that we can remove the `analyzeFwdBlocks`
hack that ignored the middle nodes (that existed for analyses that
didn't need to go over all the nodes). Now this is no longer a special
case and fits well with the new interface.
Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
Test Plan:
validate, earlier version of the patch had assertions
comparing the results with the old implementation
Reviewers: erikd, austin, simonmar, hvr, goldfire, bgamari
Reviewed By: bgamari
Subscribers: goldfire, erikd, thomie
Differential Revision: https://phabricator.haskell.org/D2754
Diffstat (limited to 'testsuite/mk')
0 files changed, 0 insertions, 0 deletions