Tag inference work.
This does three major things: * Enforce the invariant that all strict fields must contain tagged pointers. * Try to predict the tag on bindings in order to omit tag checks. * Allows functions to pass arguments unlifted (call-by-value). The former is "simply" achieved by wrapping any constructor allocations with a case which will evaluate the respective strict bindings. The prediction is done by a new data flow analysis based on the STG representation of a program. This also helps us to avoid generating redudant cases for the above invariant. StrictWorkers are created by W/W directly and SpecConstr indirectly. See the Note [Strict Worker Ids] Other minor changes: * Add StgUtil module containing a few functions needed by, but not specific to the tag analysis. ------------------------- Metric Decrease: T12545 T18698b T18140 T18923 LargeRecord Metric Increase: LargeRecord ManyAlternatives ManyConstructors T10421 T12425 T12707 T13035 T13056 T13253 T13253-spj T13379 T15164 T18282 T18304 T18698a T1969 T20049 T3294 T4801 T5321FD T5321Fun T783 T9233 T9675 T9961 T19695 WWRec -------------------------
Showing
- compiler/GHC/Cmm/CLabel.hs 35 additions, 7 deletionscompiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/Liveness.hs 2 additions, 0 deletionscompiler/GHC/Cmm/Liveness.hs
- compiler/GHC/Cmm/Utils.hs 4 additions, 3 deletionscompiler/GHC/Cmm/Utils.hs
- compiler/GHC/Core/DataCon.hs 18 additions, 2 deletionscompiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/Opt/CprAnal.hs 1 addition, 1 deletioncompiler/GHC/Core/Opt/CprAnal.hs
- compiler/GHC/Core/Opt/DmdAnal.hs 4 additions, 2 deletionscompiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/Pipeline.hs 1 addition, 1 deletioncompiler/GHC/Core/Opt/Pipeline.hs
- compiler/GHC/Core/Opt/Simplify/Monad.hs 2 additions, 1 deletioncompiler/GHC/Core/Opt/Simplify/Monad.hs
- compiler/GHC/Core/Opt/SpecConstr.hs 11 additions, 2 deletionscompiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/WorkWrap.hs 11 additions, 5 deletionscompiler/GHC/Core/Opt/WorkWrap.hs
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs 178 additions, 41 deletionscompiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/Core/Rules.hs 4 additions, 2 deletionscompiler/GHC/Core/Rules.hs
- compiler/GHC/Core/Tidy.hs 60 additions, 7 deletionscompiler/GHC/Core/Tidy.hs
- compiler/GHC/Core/Type.hs 11 additions, 0 deletionscompiler/GHC/Core/Type.hs
- compiler/GHC/Core/Utils.hs 86 additions, 5 deletionscompiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToIface.hs 1 addition, 0 deletionscompiler/GHC/CoreToIface.hs
- compiler/GHC/CoreToStg.hs 1 addition, 0 deletionscompiler/GHC/CoreToStg.hs
- compiler/GHC/CoreToStg/Prep.hs 31 additions, 9 deletionscompiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Driver/Config/StgToCmm.hs 1 addition, 0 deletionscompiler/GHC/Driver/Config/StgToCmm.hs
- compiler/GHC/Driver/Flags.hs 8 additions, 1 deletioncompiler/GHC/Driver/Flags.hs
Loading
Please register or sign in to comment