Florian Ragwitz pushed to branch wip/rafl/hpc-cleanup at Glasgow Haskell Compiler / GHC

Commits:

6 changed files:

Changes:

  • changelog.d/hpc-cleanup
    1
    +synopsis: Remove ``TickBoxOpId`` constructor of ``IdDetails`` and related dead code
    
    2
    +section: ghc-lib
    
    3
    +issues: #27946
    
    4
    +mrs: !16816
    
    5
    +description:
    
    6
    +  The obsolete ``TickBoxOpId`` constructor of ``GHC.Types.Id.Info.IdDetails``,
    
    7
    +  along with the associated types ``TickBoxOp`` and ``TickBoxId`` have been
    
    8
    +  removed.

  • compiler/GHC/Core/Opt/Specialise.hs
    ... ... @@ -1867,7 +1867,7 @@ the specialised Id correct:
    1867 1867
       allows unboxing of all previous CBV args, in which case sticking to
    
    1868 1868
       VanillaIds was the only correct choice to begin with.
    
    1869 1869
     
    
    1870
    -* RecSelId, DataCon*Id, ClassOpId, PrimOpId, FCallId, CoVarId, TickBoxId:
    
    1870
    +* RecSelId, DataCon*Id, ClassOpId, PrimOpId, FCallId, CoVarId:
    
    1871 1871
       Never specialised.
    
    1872 1872
     
    
    1873 1873
     Note [Specialisation Must Preserve Sharing]
    
    ... ... @@ -3074,7 +3074,6 @@ wantCallsFor _env f
    3074 3074
           ClassOpId {}     -> False
    
    3075 3075
           PrimOpId {}      -> False
    
    3076 3076
           FCallId {}       -> False
    
    3077
    -      TickBoxOpId {}   -> False
    
    3078 3077
           CoVarId {}       -> False
    
    3079 3078
     
    
    3080 3079
           DFunId {}        -> True
    

  • compiler/GHC/CoreToIface.hs
    ... ... @@ -492,7 +492,6 @@ toIfaceIdDetails _ (RepPolyId {}) = IfVanillaId
    492 492
     toIfaceIdDetails nm dets@(DataConWorkId {}) = not_iface_details nm dets
    
    493 493
     toIfaceIdDetails nm dets@(DataConWrapId {}) = not_iface_details nm dets
    
    494 494
     toIfaceIdDetails nm dets@(FCallId {})       = not_iface_details nm dets
    
    495
    -toIfaceIdDetails nm dets@(TickBoxOpId {})   = not_iface_details nm dets
    
    496 495
     toIfaceIdDetails nm dets@(CoVarId {})       = not_iface_details nm dets
    
    497 496
     toIfaceIdDetails nm dets@(JoinId {})        = not_iface_details nm dets
    
    498 497
     
    

  • compiler/GHC/CoreToStg.hs
    ... ... @@ -587,8 +587,6 @@ mkStgApp f how_bound core_args stg_args res_ty
    587 587
           FCallId call     -> assert exactly_saturated $
    
    588 588
                               StgOpApp (StgFCallOp call (idType f)) stg_args res_ty
    
    589 589
     
    
    590
    -      TickBoxOpId {}   -> pprPanic "coreToStg TickBox" $ ppr (f,stg_args)
    
    591
    -
    
    592 590
           _other           -> StgApp f stg_args
    
    593 591
       where
    
    594 592
         -- Mostly, the arity info of a function is in the fn's IdInfo
    

  • compiler/GHC/StgToJS/ExprCtx.hs
    ... ... @@ -163,9 +163,6 @@ ctxIsEvaluated i =
    163 163
           -- JoinId {} -> False
    
    164 164
           --   -- Don't speculate join points
    
    165 165
     
    
    166
    -      -- TickBoxOpId {} -> False
    
    167
    -      --   -- Don't speculate box ticking
    
    168
    -
    
    169 166
           -- -- Tagged (evaluated) ids
    
    170 167
           -- _ | Just sig <- idTagSig_maybe i
    
    171 168
           --   , isTaggedSig sig
    

  • compiler/GHC/Types/Id/Info.hs
    ... ... @@ -83,9 +83,6 @@ module GHC.Types.Id.Info (
    83 83
             lfInfo, setLFInfo, setTagSig,
    
    84 84
     
    
    85 85
             tagSig,
    
    86
    -
    
    87
    -        -- ** Tick-box Info
    
    88
    -        TickBoxOp(..), TickBoxId,
    
    89 86
         ) where
    
    90 87
     
    
    91 88
     import GHC.Prelude
    
    ... ... @@ -102,7 +99,6 @@ import GHC.Core.Type (mkTyConApp)
    102 99
     import GHC.Core.PatSyn
    
    103 100
     import GHC.Core.ConLike
    
    104 101
     import GHC.Types.ForeignCall
    
    105
    -import GHC.Unit.Module
    
    106 102
     import GHC.Types.Demand
    
    107 103
     import GHC.Types.Cpr
    
    108 104
     import GHC.Types.InlinePragma
    
    ... ... @@ -195,8 +191,6 @@ data IdDetails
    195 191
       | FCallId ForeignCall         -- ^ The 'Id' is for a foreign call.
    
    196 192
                                     -- Type will be simple: no type families, newtypes, etc
    
    197 193
     
    
    198
    -  | TickBoxOpId TickBoxOp       -- ^ The 'Id' is for a HPC tick box (both traditional and binary)
    
    199
    -
    
    200 194
       | DFunId Bool                 -- ^ A dictionary function.
    
    201 195
            -- Bool = True <=> a dictionary of this class cannot be bottom
    
    202 196
            -- See Note [NON-BOTTOM-DICTS invariant] in GHC.Core
    
    ... ... @@ -445,7 +439,6 @@ pprIdDetails other = brackets (pp other)
    445 439
        pp (RepPolyId {})          = text "RepPolyId"
    
    446 440
        pp (PrimOpId {})           = text "PrimOp"
    
    447 441
        pp (FCallId _)             = text "ForeignCall"
    
    448
    -   pp (TickBoxOpId _)         = text "TickBoxOp"
    
    449 442
        pp (DFunId terminating)    = text "DFunId"
    
    450 443
                                     <> ppWhen (not terminating) (text "(may-be-bottom)")
    
    451 444
        pp (RecSelId { sel_naughty = is_naughty })
    
    ... ... @@ -970,20 +963,3 @@ zapTailCallInfo info
    970 963
     
    
    971 964
     zapCallArityInfo :: IdInfo -> IdInfo
    
    972 965
     zapCallArityInfo info = setCallArityInfo info 0
    973
    -
    
    974
    -{-
    
    975
    -************************************************************************
    
    976
    -*                                                                      *
    
    977
    -\subsection{TickBoxOp}
    
    978
    -*                                                                      *
    
    979
    -************************************************************************
    
    980
    --}
    
    981
    -
    
    982
    -type TickBoxId = Int
    
    983
    -
    
    984
    --- | Tick box for Hpc-style coverage
    
    985
    -data TickBoxOp
    
    986
    -   = TickBox Module {-# UNPACK #-} !TickBoxId
    
    987
    -
    
    988
    -instance Outputable TickBoxOp where
    
    989
    -    ppr (TickBox mod n)         = text "tick" <+> ppr (mod,n)