Dataflow: use IntSet for mkDepBlocks
authorMichal Terepeta <michal.terepeta@gmail.com>
Mon, 8 May 2017 21:47:02 +0000 (17:47 -0400)
committerBen Gamari <ben@smart-cactus.org>
Mon, 8 May 2017 21:47:10 +0000 (17:47 -0400)
commitb99bae6d132e083b73283963be85932596341ddd
treea156d3f6fc78040ed1f38d475ca0e84dac9e2a75
parentc5b28e06cc71cba56153e59e2958f24cdf183fb9
Dataflow: use IntSet for mkDepBlocks

Using `IntSet` instead of `[Int]` is nicer since it gets rid of
appending to a list (in the backward case) and folding over it is
ordered.

I also added a comment about how `mkDepBlocks` works since its
behavior can be a bit surprising at first sight (it took me some time
to see that it's doing the right thing ;)

Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
Test Plan: ./validate

Reviewers: austin, bgamari, simonmar

Reviewed By: bgamari

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3530
compiler/cmm/Hoopl/Dataflow.hs