Demand analysis: simplify the demand for a RHS
Ticket #17932 showed that we were using a stupid demand for the RHS of a let-binding, when the result is a product. This was the result of a "fix" in 2013, which (happily) turns out to no longer be necessary. So I just deleted the code, which simplifies the demand analyser, and fixes #17932. That in turn uncovered that the anticipation of worker/wrapper in CPR analysis was inaccurate, hence the logic that decides whether to unbox an argument in WW was extracted into a function `wantToUnbox`, now consulted by CPR analysis. I tried nofib, and got 0.0% perf changes. All this came up when messing about with !2873 (ticket #17917), but is idependent of it.
parent
b03fd3bc
No related branches found
No related tags found
Pipeline #17018 failed
Stage: lint
Stage: quick-build
Stage: build
Stage: full-build
Stage: cleanup
Stage: packaging
Stage: testing
Showing
- compiler/GHC/Core/Op/CprAnal.hs 35 additions, 51 deletionscompiler/GHC/Core/Op/CprAnal.hs
- compiler/GHC/Core/Op/DmdAnal.hs 13 additions, 14 deletionscompiler/GHC/Core/Op/DmdAnal.hs
- compiler/GHC/Core/Op/WorkWrap/Lib.hs 69 additions, 31 deletionscompiler/GHC/Core/Op/WorkWrap/Lib.hs
- testsuite/tests/simplCore/should_compile/T4201.stdout 1 addition, 1 deletiontestsuite/tests/simplCore/should_compile/T4201.stdout
- testsuite/tests/stranal/T10482a.hs 5 additions, 0 deletionstestsuite/tests/stranal/T10482a.hs
- testsuite/tests/stranal/should_compile/T10482.stderr 105 additions, 123 deletionstestsuite/tests/stranal/should_compile/T10482.stderr
- testsuite/tests/stranal/should_compile/T10482a.stderr 166 additions, 206 deletionstestsuite/tests/stranal/should_compile/T10482a.stderr
- testsuite/tests/stranal/sigs/DmdAnalGADTs.stderr 3 additions, 3 deletionstestsuite/tests/stranal/sigs/DmdAnalGADTs.stderr
- testsuite/tests/stranal/sigs/T17932.hs 11 additions, 0 deletionstestsuite/tests/stranal/sigs/T17932.hs
- testsuite/tests/stranal/sigs/T17932.stderr 30 additions, 0 deletionstestsuite/tests/stranal/sigs/T17932.stderr
- testsuite/tests/stranal/sigs/UnsatFun.stderr 4 additions, 4 deletionstestsuite/tests/stranal/sigs/UnsatFun.stderr
- testsuite/tests/stranal/sigs/all.T 1 addition, 0 deletionstestsuite/tests/stranal/sigs/all.T
Loading
Please register or sign in to comment