summaryrefslogtreecommitdiff
path: root/compiler/cmm/BlockId.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/cmm/BlockId.hs')
-rw-r--r--compiler/cmm/BlockId.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/cmm/BlockId.hs b/compiler/cmm/BlockId.hs
index 8f11ad194b..4f4e0e8c53 100644
--- a/compiler/cmm/BlockId.hs
+++ b/compiler/cmm/BlockId.hs
@@ -8,14 +8,15 @@ module BlockId
, blockLbl, infoTblLbl
) where
+import GhcPrelude
+
import CLabel
import IdInfo
import Name
import Unique
import UniqSupply
-import Hoopl.Label (Label, uniqueToLbl)
-import Hoopl.Unique (intToUnique)
+import Hoopl.Label (Label, mkHooplLabel)
----------------------------------------------------------------
--- Block Ids, their environments, and their sets
@@ -32,13 +33,14 @@ compilation unit in which it appears.
type BlockId = Label
mkBlockId :: Unique -> BlockId
-mkBlockId unique = uniqueToLbl $ intToUnique $ getKey unique
+mkBlockId unique = mkHooplLabel $ getKey unique
newBlockId :: MonadUnique m => m BlockId
newBlockId = mkBlockId <$> getUniqueM
blockLbl :: BlockId -> CLabel
-blockLbl label = mkEntryLabel (mkFCallName (getUnique label) "block") NoCafRefs
+blockLbl label = mkLocalBlockLabel (getUnique label)
infoTblLbl :: BlockId -> CLabel
-infoTblLbl label = mkInfoTableLabel (mkFCallName (getUnique label) "block") NoCafRefs
+infoTblLbl label
+ = mkBlockInfoTableLabel (mkFCallName (getUnique label) "block") NoCafRefs