DmdAnal: Look through unfoldings of DataCon wrappers (#22241)
Previously, the demand signature we computed upfront for a DataCon wrapper lacked boxity information and was much less precise than the demand transformer for the DataCon worker. In this patch we adopt the solution to look through unfoldings of DataCon wrappers during Demand Analysis, but still attach a demand signature for other passes such as the Simplifier. See `Note [DmdAnal for DataCon wrappers]` for more details. Fixes #22241.
Showing
- compiler/GHC/Core/Opt/CprAnal.hs 4 additions, 1 deletioncompiler/GHC/Core/Opt/CprAnal.hs
- compiler/GHC/Core/Opt/DmdAnal.hs 43 additions, 0 deletionscompiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Types/Id/Make.hs 8 additions, 6 deletionscompiler/GHC/Types/Id/Make.hs
- testsuite/tests/stranal/sigs/T22241.hs 31 additions, 0 deletionstestsuite/tests/stranal/sigs/T22241.hs
- testsuite/tests/stranal/sigs/T22241.stderr 24 additions, 0 deletionstestsuite/tests/stranal/sigs/T22241.stderr
- testsuite/tests/stranal/sigs/all.T 1 addition, 0 deletionstestsuite/tests/stranal/sigs/all.T
Loading
Please register or sign in to comment