Be a bit more aggressive about let-to-case
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 12 Sep 2018 12:06:53 +0000 (13:06 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 12 Sep 2018 12:11:06 +0000 (13:11 +0100)
commit0e6d42fe76958648243f99c49e648769c1ea658c
tree4e4c97b797500e8b05f1094de0474438762bd532
parentce23451c2c771bfbbac27ce63c5fdccc7ed02b3b
Be a bit more aggressive about let-to-case

This patch takes up the missed opportunity described in
Trac #15631, by convering a case into a let slightly
more agressively. See Simplify.hs
Note [Case-to-let for strictly-used binders]

There is no measurable perf impact for good or ill. But
the code is simpler and easier to explain.
compiler/simplCore/Simplify.hs
testsuite/tests/simplCore/should_compile/Makefile
testsuite/tests/simplCore/should_compile/T15631.hs [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/T15631.stdout [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/all.T