X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FCLabel.hs;h=eef42947fe2e8fdccb66e9630849f3cf5f696b50;hb=36f77deda25312534200f10ccdb18528b6ee6e27;hp=67f7a2ed962fac39fcf49de6aa9aa490fa66fcba;hpb=28c556a5e0ed5c2687f19ec6ef8853b79ad65518;p=ghc-hetmet.git diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs index 67f7a2e..eef4294 100644 --- a/compiler/cmm/CLabel.hs +++ b/compiler/cmm/CLabel.hs @@ -48,7 +48,6 @@ module CLabel ( mkSplitMarkerLabel, mkDirty_MUT_VAR_Label, mkUpdInfoLabel, - mkSeqInfoLabel, mkIndStaticInfoLabel, mkMainCapabilityLabel, mkMAP_FROZEN_infoLabel, @@ -95,9 +94,10 @@ module CLabel ( mkHpcTicksLabel, mkHpcModuleNameLabel, + mkHpcModuleOffsetLabel, infoLblToEntryLbl, entryLblToInfoLbl, - needsCDecl, isAsmTemp, externallyVisibleCLabel, + needsCDecl, isAsmTemp, maybeAsmTemp, externallyVisibleCLabel, CLabelType(..), labelType, labelDynamic, pprCLabel @@ -210,6 +210,7 @@ data CLabel | HpcTicksLabel Module -- Per-module table of tick locations | HpcModuleNameLabel -- Per-module name of the module for Hpc + | HpcModuleOffsetLabel Module-- Per-module offset of the module for Hpc (dynamically generated) deriving (Eq, Ord) @@ -356,7 +357,6 @@ mkPlainModuleInitLabel this_pkg mod mkSplitMarkerLabel = RtsLabel (RtsCode SLIT("__stg_split_marker")) mkDirty_MUT_VAR_Label = RtsLabel (RtsCode SLIT("dirty_MUT_VAR")) mkUpdInfoLabel = RtsLabel (RtsInfo SLIT("stg_upd_frame")) -mkSeqInfoLabel = RtsLabel (RtsInfo SLIT("stg_seq_frame")) mkIndStaticInfoLabel = RtsLabel (RtsInfo SLIT("stg_IND_STATIC")) mkMainCapabilityLabel = RtsLabel (RtsData SLIT("MainCapability")) mkMAP_FROZEN_infoLabel = RtsLabel (RtsInfo SLIT("stg_MUT_ARR_PTRS_FROZEN0")) @@ -412,6 +412,7 @@ mkRtsSlowTickyCtrLabel pat = RtsLabel (RtsSlowTickyCtr pat) mkHpcTicksLabel = HpcTicksLabel mkHpcModuleNameLabel = HpcModuleNameLabel +mkHpcModuleOffsetLabel = HpcModuleOffsetLabel -- Dynamic linking @@ -485,6 +486,7 @@ needsCDecl (ForeignLabel _ _ _) = False needsCDecl (CC_Label _) = True needsCDecl (CCS_Label _) = True needsCDecl (HpcTicksLabel _) = True +needsCDecl (HpcModuleOffsetLabel _) = True needsCDecl HpcModuleNameLabel = False -- Whether the label is an assembler temporary: @@ -493,6 +495,10 @@ isAsmTemp :: CLabel -> Bool -- is a local temporary for native code generati isAsmTemp (AsmTempLabel _) = True isAsmTemp _ = False +maybeAsmTemp :: CLabel -> Maybe Unique +maybeAsmTemp (AsmTempLabel uq) = Just uq +maybeAsmTemp _ = Nothing + -- ----------------------------------------------------------------------------- -- Is a CLabel visible outside this object file or not? @@ -515,6 +521,7 @@ externallyVisibleCLabel (CC_Label _) = True externallyVisibleCLabel (CCS_Label _) = True externallyVisibleCLabel (DynamicLinkerLabel _ _) = False externallyVisibleCLabel (HpcTicksLabel _) = True +externallyVisibleCLabel (HpcModuleOffsetLabel _) = True externallyVisibleCLabel HpcModuleNameLabel = False -- ----------------------------------------------------------------------------- @@ -559,6 +566,8 @@ idInfoLabelType info = ConInfoTable -> DataLabel StaticInfoTable -> DataLabel ClosureTable -> DataLabel +-- krc: aie! a ticky counter label is data + RednCounts -> DataLabel _ -> CodeLabel @@ -777,7 +786,10 @@ pprCLbl (PlainModuleInitLabel mod _) = ptext SLIT("__stginit_") <> ppr mod pprCLbl (HpcTicksLabel mod) - = ptext SLIT("_tickboxes_") <> ppr mod <> ptext SLIT("_hpc") + = ptext SLIT("_hpc_tickboxes_") <> ppr mod <> ptext SLIT("_hpc") + +pprCLbl (HpcModuleOffsetLabel mod) + = ptext SLIT("_hpc_module_offset_") <> ppr mod <> ptext SLIT("_hpc") pprCLbl HpcModuleNameLabel = ptext SLIT("_hpc_module_name_str")