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/AsmCodeGen.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/AsmCodeGen.hs')
-rw-r--r-- | compiler/nativeGen/AsmCodeGen.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/nativeGen/AsmCodeGen.hs b/compiler/nativeGen/AsmCodeGen.hs index affb3e4e4a..ad897abc0f 100644 --- a/compiler/nativeGen/AsmCodeGen.hs +++ b/compiler/nativeGen/AsmCodeGen.hs @@ -877,7 +877,8 @@ build_mapping ncgImpl (CmmProc info lbl live (ListGraph (head:blocks))) -- find all the blocks that just consist of a jump that can be -- shorted. -- Don't completely eliminate loops here -- that can leave a dangling jump! - (_, shortcut_blocks, others) = foldl split (emptyBlockSet, [], []) blocks + (_, shortcut_blocks, others) = + foldl split (setEmpty :: LabelSet, [], []) blocks split (s, shortcut_blocks, others) b@(BasicBlock id [insn]) | Just jd <- canShortcut ncgImpl insn, Just dest <- getJumpDestBlockId ncgImpl jd, |