summaryrefslogtreecommitdiff
path: root/compiler/cmm/CLabel.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-09-25 16:02:45 +0100
committerSimon Marlow <marlowsd@gmail.com>2012-09-25 16:13:17 +0100
commit3473e213941b74a1074ec0cde77c0eeccf885e03 (patch)
tree76ee5bdd038e19b77241630efcb9e95b185d6683 /compiler/cmm/CLabel.hs
parent93faddc55c2402ca23c3cf227f79e70dd22d0e3c (diff)
downloadhaskell-3473e213941b74a1074ec0cde77c0eeccf885e03.tar.gz
When -split-objs is on, make one SRT per split, not one per module
This is a hopefully temporary measure until the new SRT design is implemeented.
Diffstat (limited to 'compiler/cmm/CLabel.hs')
-rw-r--r--compiler/cmm/CLabel.hs22
1 files changed, 9 insertions, 13 deletions
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
index 1ff76c6fe4..a5d559e9ff 100644
--- a/compiler/cmm/CLabel.hs
+++ b/compiler/cmm/CLabel.hs
@@ -13,7 +13,7 @@ module CLabel (
mkClosureLabel,
mkSRTLabel,
- mkModSRTLabel,
+ mkTopSRTLabel,
mkInfoTableLabel,
mkEntryLabel,
mkSlowEntryLabel,
@@ -120,8 +120,6 @@ import DynFlags
import Platform
import UniqSet
-import Data.Maybe (isJust)
-
-- -----------------------------------------------------------------------------
-- The CLabel type
@@ -218,7 +216,7 @@ data CLabel
| HpcTicksLabel Module
-- | Static reference table
- | SRTLabel (Maybe Module) !Unique
+ | SRTLabel !Unique
-- | Label of an StgLargeSRT
| LargeSRTLabel
@@ -355,8 +353,8 @@ data DynamicLinkerLabelInfo
mkSlowEntryLabel :: Name -> CafInfo -> CLabel
mkSlowEntryLabel name c = IdLabel name c Slow
-mkModSRTLabel :: Maybe Module -> Unique -> CLabel
-mkModSRTLabel mb_mod u = SRTLabel mb_mod u
+mkTopSRTLabel :: Unique -> CLabel
+mkTopSRTLabel u = SRTLabel u
mkSRTLabel :: Name -> CafInfo -> CLabel
mkRednCountsLabel :: Name -> CafInfo -> CLabel
@@ -592,7 +590,7 @@ needsCDecl :: CLabel -> Bool
-- False <=> it's pre-declared; don't bother
-- don't bother declaring Bitmap labels, we always make sure
-- they are defined before use.
-needsCDecl (SRTLabel _ _) = True
+needsCDecl (SRTLabel _) = True
needsCDecl (LargeSRTLabel _) = False
needsCDecl (LargeBitmapLabel _) = False
needsCDecl (IdLabel _ _ _) = True
@@ -740,7 +738,7 @@ externallyVisibleCLabel (CCS_Label _) = True
externallyVisibleCLabel (DynamicLinkerLabel _ _) = False
externallyVisibleCLabel (HpcTicksLabel _) = True
externallyVisibleCLabel (LargeBitmapLabel _) = False
-externallyVisibleCLabel (SRTLabel mb_mod _) = isJust mb_mod
+externallyVisibleCLabel (SRTLabel _) = False
externallyVisibleCLabel (LargeSRTLabel _) = False
externallyVisibleCLabel (PicBaseLabel {}) = panic "externallyVisibleCLabel PicBaseLabel"
externallyVisibleCLabel (DeadStripPreventer {}) = panic "externallyVisibleCLabel DeadStripPreventer"
@@ -788,7 +786,7 @@ labelType (RtsLabel (RtsApFast _)) = CodeLabel
labelType (CaseLabel _ CaseReturnInfo) = DataLabel
labelType (CaseLabel _ _) = CodeLabel
labelType (PlainModuleInitLabel _) = CodeLabel
-labelType (SRTLabel _ _) = DataLabel
+labelType (SRTLabel _) = DataLabel
labelType (LargeSRTLabel _) = DataLabel
labelType (LargeBitmapLabel _) = DataLabel
labelType (ForeignLabel _ _ _ IsFunction) = CodeLabel
@@ -991,10 +989,8 @@ pprCLbl (CaseLabel u (CaseAlt tag))
pprCLbl (CaseLabel u CaseDefault)
= hcat [pprUnique u, ptext (sLit "_dflt")]
-pprCLbl (SRTLabel mb_mod u)
- = pp_mod <> pprUnique u <> pp_cSEP <> ptext (sLit "srt")
- where pp_mod | Just mod <- mb_mod = ppr mod <> pp_cSEP
- | otherwise = empty
+pprCLbl (SRTLabel u)
+ = pprUnique u <> pp_cSEP <> ptext (sLit "srt")
pprCLbl (LargeSRTLabel u) = pprUnique u <> pp_cSEP <> ptext (sLit "srtd")
pprCLbl (LargeBitmapLabel u) = text "b" <> pprUnique u <> pp_cSEP <> ptext (sLit "btm")