Arity: Record arity types for non-recursive lets
In #18793, we saw a compelling example which requires us to look at non-recursive let-bindings during arity analysis and unleash their arity types at use sites. After the refactoring in the previous patch, the needed change is quite simple and very local to `arityType`'s defn for non-recurisve `Let`. Apart from that, we had to get rid of the second item of `Note [Dealing with bottoms]`, which was entirely a safety measure and hindered optimistic fixed-point iteration. Fixes #18793. The following metric increases are all caused by this commit and a result of the fact that we just do more work now: Metric Increase: T3294 T12545 T12707
Showing
- compiler/GHC/Core/Opt/Arity.hs 106 additions, 62 deletionscompiler/GHC/Core/Opt/Arity.hs
- testsuite/tests/arityanal/should_compile/T18793.hs 12 additions, 0 deletionstestsuite/tests/arityanal/should_compile/T18793.hs
- testsuite/tests/arityanal/should_compile/T18793.stderr 94 additions, 0 deletionstestsuite/tests/arityanal/should_compile/T18793.stderr
- testsuite/tests/arityanal/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/arityanal/should_compile/all.T
- testsuite/tests/stranal/should_compile/T13031.stdout 1 addition, 1 deletiontestsuite/tests/stranal/should_compile/T13031.stdout
Loading
Please register or sign in to comment