Florian Ragwitz pushed to branch wip/rafl/hpc-cleanup at Glasgow Haskell Compiler / GHC Commits: 0025276b by Florian Ragwitz at 2026-10-13T18:28:40-07:00 Remove obsolete HPC types Fixes #27946. - - - - - 6 changed files: - + changelog.d/hpc-cleanup - compiler/GHC/Core/Opt/Specialise.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/CoreToStg.hs - compiler/GHC/StgToJS/ExprCtx.hs - compiler/GHC/Types/Id/Info.hs Changes: ===================================== changelog.d/hpc-cleanup ===================================== @@ -0,0 +1,8 @@ +synopsis: Remove ``TickBoxOpId`` constructor of ``IdDetails`` and related dead code +section: ghc-lib +issues: #27946 +mrs: !16816 +description: + The obsolete ``TickBoxOpId`` constructor of ``GHC.Types.Id.Info.IdDetails``, + along with the associated types ``TickBoxOp`` and ``TickBoxId`` have been + removed. ===================================== compiler/GHC/Core/Opt/Specialise.hs ===================================== @@ -1867,7 +1867,7 @@ the specialised Id correct: allows unboxing of all previous CBV args, in which case sticking to VanillaIds was the only correct choice to begin with. -* RecSelId, DataCon*Id, ClassOpId, PrimOpId, FCallId, CoVarId, TickBoxId: +* RecSelId, DataCon*Id, ClassOpId, PrimOpId, FCallId, CoVarId: Never specialised. Note [Specialisation Must Preserve Sharing] @@ -3074,7 +3074,6 @@ wantCallsFor _env f ClassOpId {} -> False PrimOpId {} -> False FCallId {} -> False - TickBoxOpId {} -> False CoVarId {} -> False DFunId {} -> True ===================================== compiler/GHC/CoreToIface.hs ===================================== @@ -492,7 +492,6 @@ toIfaceIdDetails _ (RepPolyId {}) = IfVanillaId toIfaceIdDetails nm dets@(DataConWorkId {}) = not_iface_details nm dets toIfaceIdDetails nm dets@(DataConWrapId {}) = not_iface_details nm dets toIfaceIdDetails nm dets@(FCallId {}) = not_iface_details nm dets -toIfaceIdDetails nm dets@(TickBoxOpId {}) = not_iface_details nm dets toIfaceIdDetails nm dets@(CoVarId {}) = not_iface_details nm dets toIfaceIdDetails nm dets@(JoinId {}) = not_iface_details nm dets ===================================== compiler/GHC/CoreToStg.hs ===================================== @@ -587,8 +587,6 @@ mkStgApp f how_bound core_args stg_args res_ty FCallId call -> assert exactly_saturated $ StgOpApp (StgFCallOp call (idType f)) stg_args res_ty - TickBoxOpId {} -> pprPanic "coreToStg TickBox" $ ppr (f,stg_args) - _other -> StgApp f stg_args where -- Mostly, the arity info of a function is in the fn's IdInfo ===================================== compiler/GHC/StgToJS/ExprCtx.hs ===================================== @@ -163,9 +163,6 @@ ctxIsEvaluated i = -- JoinId {} -> False -- -- Don't speculate join points - -- TickBoxOpId {} -> False - -- -- Don't speculate box ticking - -- -- Tagged (evaluated) ids -- _ | Just sig <- idTagSig_maybe i -- , isTaggedSig sig ===================================== compiler/GHC/Types/Id/Info.hs ===================================== @@ -83,9 +83,6 @@ module GHC.Types.Id.Info ( lfInfo, setLFInfo, setTagSig, tagSig, - - -- ** Tick-box Info - TickBoxOp(..), TickBoxId, ) where import GHC.Prelude @@ -102,7 +99,6 @@ import GHC.Core.Type (mkTyConApp) import GHC.Core.PatSyn import GHC.Core.ConLike import GHC.Types.ForeignCall -import GHC.Unit.Module import GHC.Types.Demand import GHC.Types.Cpr import GHC.Types.InlinePragma @@ -195,8 +191,6 @@ data IdDetails | FCallId ForeignCall -- ^ The 'Id' is for a foreign call. -- Type will be simple: no type families, newtypes, etc - | TickBoxOpId TickBoxOp -- ^ The 'Id' is for a HPC tick box (both traditional and binary) - | DFunId Bool -- ^ A dictionary function. -- Bool = True <=> a dictionary of this class cannot be bottom -- See Note [NON-BOTTOM-DICTS invariant] in GHC.Core @@ -445,7 +439,6 @@ pprIdDetails other = brackets (pp other) pp (RepPolyId {}) = text "RepPolyId" pp (PrimOpId {}) = text "PrimOp" pp (FCallId _) = text "ForeignCall" - pp (TickBoxOpId _) = text "TickBoxOp" pp (DFunId terminating) = text "DFunId" <> ppWhen (not terminating) (text "(may-be-bottom)") pp (RecSelId { sel_naughty = is_naughty }) @@ -970,20 +963,3 @@ zapTailCallInfo info zapCallArityInfo :: IdInfo -> IdInfo zapCallArityInfo info = setCallArityInfo info 0 - -{- -************************************************************************ -* * -\subsection{TickBoxOp} -* * -************************************************************************ --} - -type TickBoxId = Int - --- | Tick box for Hpc-style coverage -data TickBoxOp - = TickBox Module {-# UNPACK #-} !TickBoxId - -instance Outputable TickBoxOp where - ppr (TickBox mod n) = text "tick" <+> ppr (mod,n) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0025276b4232cce4c7f5d73d5f613512... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0025276b4232cce4c7f5d73d5f613512... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help