Stamp out space leaks from demand analysis
authorReid Barton <rwbarton@gmail.com>
Sat, 1 Apr 2017 15:51:59 +0000 (11:51 -0400)
committerBen Gamari <ben@smart-cactus.org>
Sat, 1 Apr 2017 16:31:59 +0000 (12:31 -0400)
commitf2b10f35a053e595fd309f523c5e93f619d2ec3a
tree1c4ebdc9c61b3c48d85eca4c33d40736fbbb3581
parent3b5f786c7257298657fd34b3840d8cf6da968ef6
Stamp out space leaks from demand analysis

This reduces peak memory usage by ~30% on my test case (DynFlags),
and (probably as a result of reduced GC work) decreases compilation
time by a few percent as well.

Also fix a bug in seqStrDmd so that demeand info is fully evaluated.

Reviewers: simonpj, austin, bgamari

Reviewed By: bgamari

Subscribers: dfeuer, thomie

Differential Revision: https://phabricator.haskell.org/D3400
compiler/basicTypes/Demand.hs
compiler/stranal/DmdAnal.hs
testsuite/tests/perf/compiler/all.T