diff options
author | Michal Terepeta <michal.terepeta@gmail.com> | 2016-11-29 17:49:27 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-11-29 18:46:32 -0500 |
commit | 23dc6c459b61b400c7140ffc49b3b8b45a4a1159 (patch) | |
tree | 3c6e2f982e50d7d950c4473f0d27a80399b574bc /compiler/nativeGen/RegAlloc/Graph/Spill.hs | |
parent | 758b81d28f15910fa56168d3bf9ab6945f8925c4 (diff) | |
download | haskell-23dc6c459b61b400c7140ffc49b3b8b45a4a1159.tar.gz |
Remove most functions from cmm/BlockId
It seems that `BlockId` module could simply go away in favor
of Hoopl's `Label`. This is the first step to do that.
In a few places I had to add some type signatures, but most of
them seem to help with code readability.
Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
Test Plan: ./validate
Reviewers: austin, simonmar, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2765
Diffstat (limited to 'compiler/nativeGen/RegAlloc/Graph/Spill.hs')
-rw-r--r-- | compiler/nativeGen/RegAlloc/Graph/Spill.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/nativeGen/RegAlloc/Graph/Spill.hs b/compiler/nativeGen/RegAlloc/Graph/Spill.hs index a9ea6e5728..445f416187 100644 --- a/compiler/nativeGen/RegAlloc/Graph/Spill.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Spill.hs @@ -135,7 +135,7 @@ regSpill_top platform regSlotMap cmm = let -- Slots that are already recorded as being live. curSlotsLive = fromMaybe IntSet.empty - $ lookupBlockMap blockId slotMap + $ mapLookup blockId slotMap moreSlotsLive = IntSet.fromList $ catMaybes @@ -144,8 +144,8 @@ regSpill_top platform regSlotMap cmm -- See Note [Unique Determinism and code generation] slotMap' - = insertBlockMap blockId (IntSet.union curSlotsLive moreSlotsLive) - slotMap + = mapInsert blockId (IntSet.union curSlotsLive moreSlotsLive) + slotMap in slotMap' |