restore -fmax-worker-args handling (Trac #11565)
authorSergei Trofimovich <slyfox@gentoo.org>
Thu, 1 Sep 2016 16:34:58 +0000 (17:34 +0100)
committerSergei Trofimovich <siarheit@google.com>
Thu, 1 Sep 2016 16:36:37 +0000 (17:36 +0100)
commita48de37dcca98e7d477040b0ed298bcd1b3ab303
treea668a64334152ab6e62028fb0d4cf5aa81ebc33e
parentda920f691145175dc310055ae533757e638caab4
restore -fmax-worker-args handling (Trac #11565)

maxWorkerArgs handling was accidentally lost 3 years ago
in a major update of demand analysis
    commit 0831a12ea2fc73c33652eeec1adc79fa19700578

Old regression is noticeable as:
- code bloat (requires stack reshuffling)
- compilation slowdown (more code to optimise/generate)
- and increased heap usage (DynFlags unboxing/reboxing?)

On a simple compile benchmark this change causes heap
allocation drop from 70G don to 67G (ghc perf build).

Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Reviewers: simonpj, ezyang, goldfire, austin, bgamari

Reviewed By: simonpj, ezyang

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2503

GHC Trac Issues: #11565
compiler/stranal/WwLib.hs
testsuite/tests/perf/compiler/all.T
testsuite/tests/perf/space_leaks/all.T