CmmUtils: get rid of insertBlock
authorMichal Terepeta <michal.terepeta@gmail.com>
Mon, 19 Mar 2018 16:03:20 +0000 (12:03 -0400)
committerBen Gamari <ben@smart-cactus.org>
Mon, 19 Mar 2018 16:05:12 +0000 (12:05 -0400)
commit256577fbde836f13c744418d38d18c17a369f7e9
tree3bce5b87c24e6832e1c659a3d737768dad130822
parent20cbb0165e4d18df510e707791e761942d3c10f0
CmmUtils: get rid of insertBlock

`Hoopl.Graph` has almost exactly the same function, so let's use that.
Also, use `IntMap.alter` to make it more efficient.

Also switch `Hoopl` to use strict maps.

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

Reviewers: bgamari, simonmar

Reviewed By: bgamari

Subscribers: dfeuer, rwbarton, thomie, carter

Differential Revision: https://phabricator.haskell.org/D4493
compiler/cmm/CmmProcPoint.hs
compiler/cmm/CmmUtils.hs
compiler/cmm/Hoopl/Collections.hs
compiler/cmm/Hoopl/Graph.hs
compiler/cmm/Hoopl/Label.hs