[Git][ghc/ghc][wip/T18793] 2 commits: Arity analysis: Record arity types for non-recursive lets

Sebastian Graf gitlab at gitlab.haskell.org
Fri Oct 9 13:06:47 UTC 2020



Sebastian Graf pushed to branch wip/T18793 at Glasgow Haskell Compiler / GHC


Commits:
28381a71 by Sebastian Graf at 2020-10-09T15:06:41+02:00
Arity analysis: 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.

- - - - -
f98fafce by Sebastian Graf at 2020-10-09T15:06:41+02:00
Testsuite: Add dead arity analysis tests

We didn't seem to test these old tests at all, judging from their
expected output.

- - - - -


30 changed files:

- compiler/GHC/Core/Opt/Arity.hs
- − testsuite/tests/arityanal/Main.hs
- − testsuite/tests/arityanal/Main.stderr
- testsuite/tests/arityanal/Makefile
- − testsuite/tests/arityanal/f0.stderr
- − testsuite/tests/arityanal/f1.stderr
- − testsuite/tests/arityanal/f10.stderr
- − testsuite/tests/arityanal/f11.stderr
- − testsuite/tests/arityanal/f12.stderr
- − testsuite/tests/arityanal/f13.stderr
- − testsuite/tests/arityanal/f14.stderr
- − testsuite/tests/arityanal/f15.stderr
- − testsuite/tests/arityanal/f2.stderr
- − testsuite/tests/arityanal/f3.stderr
- − testsuite/tests/arityanal/f4.stderr
- − testsuite/tests/arityanal/f5.stderr
- − testsuite/tests/arityanal/f6.stderr
- − testsuite/tests/arityanal/f7.stderr
- − testsuite/tests/arityanal/f8.stderr
- − testsuite/tests/arityanal/f9.stderr
- − testsuite/tests/arityanal/prim.stderr
- testsuite/tests/arityanal/f0.hs → testsuite/tests/arityanal/should_compile/Arity00.hs
- + testsuite/tests/arityanal/should_compile/Arity00.stderr
- testsuite/tests/arityanal/f1.hs → testsuite/tests/arityanal/should_compile/Arity01.hs
- + testsuite/tests/arityanal/should_compile/Arity01.stderr
- testsuite/tests/arityanal/f2.hs → testsuite/tests/arityanal/should_compile/Arity02.hs
- + testsuite/tests/arityanal/should_compile/Arity02.stderr
- testsuite/tests/arityanal/f3.hs → testsuite/tests/arityanal/should_compile/Arity03.hs
- + testsuite/tests/arityanal/should_compile/Arity03.stderr
- testsuite/tests/arityanal/f4.hs → testsuite/tests/arityanal/should_compile/Arity04.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a8780644f9d715723da36998386d160505fe4ad8...f98fafce3fc1bfb3833ac341ad95793cbdd4b513

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a8780644f9d715723da36998386d160505fe4ad8...f98fafce3fc1bfb3833ac341ad95793cbdd4b513
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201009/e10c31be/attachment.html>


More information about the ghc-commits mailing list