Simplifier: Preserve OccInfo on DataAlt fields when case binder is dead (#24770)
See the adjusted `Note [DataAlt occ info]`. This change also has a positive repercussion on `Note [Combine case alts: awkward corner]`. Fixes #24770. We now try not to call `dataConRepStrictness` in `adjustFieldsIdInfo` when all fields are lazy anyway, leading to a 2% ghc/alloc decrease in T9675. Metric Decrease: T9675
Showing
- compiler/GHC/Core/Opt/CSE.hs 15 additions, 22 deletionscompiler/GHC/Core/Opt/CSE.hs
- compiler/GHC/Core/Opt/OccurAnal.hs 16 additions, 11 deletionscompiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/SetLevels.hs 1 addition, 1 deletioncompiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs 110 additions, 64 deletionscompiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/SpecConstr.hs 3 additions, 3 deletionscompiler/GHC/Core/Opt/SpecConstr.hs
- testsuite/tests/simplCore/should_compile/T21851.stderr 7 additions, 3 deletionstestsuite/tests/simplCore/should_compile/T21851.stderr
- testsuite/tests/simplCore/should_compile/T24770.hs 3 additions, 0 deletionstestsuite/tests/simplCore/should_compile/T24770.hs
- testsuite/tests/simplCore/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/simplCore/should_compile/all.T
Loading
Please register or sign in to comment