Do not add unfoldings to lambda-binders
For reasons described in GHC.Core.Opt.Simplify Historical Note [Case binders and join points], we used to keep a Core unfolding in one of the lambda-binders for a join point. But this was always a gross hack -- it's very odd to have an unfolding in a lambda binder, that refers to earlier lambda binders. The hack bit us in various ways: * Most seriously, it is incompatible with linear types in Core. * It complicated demand analysis, and could worsen results * It required extra care in the simplifier (simplLamBinder) * It complicated !5641 (look for "join binder unfoldings") So this patch just removes the hack. Happily, doind so turned out to have no effect on performance.
Showing
- compiler/GHC/Core/Lint.hs 2 additions, 4 deletionscompiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/DmdAnal.hs 2 additions, 19 deletionscompiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/Simplify.hs 16 additions, 61 deletionscompiler/GHC/Core/Opt/Simplify.hs
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs 1 addition, 4 deletionscompiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/Types/Id/Info.hs 2 additions, 0 deletionscompiler/GHC/Types/Id/Info.hs
Please register or sign in to comment