The Early Inline Patch
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 28 Feb 2017 21:07:20 +0000 (16:07 -0500)
committerDavid Feuer <David.Feuer@gmail.com>
Tue, 28 Feb 2017 21:07:21 +0000 (16:07 -0500)
commit2effe18ab51d66474724d38b20e49cc1b8738f60
tree8e69360fe2b24408778944f2450f3903e8236168
parent55efc9718b520ef354e32c15c4b49cdfecce412f
The Early Inline Patch

This very small patch switches on sm_inline even in the InitialPhase
(aka "gentle" phase).   There is no reason not to... and the results
are astonishing.

I think the peformance of GHC itself improves by about 5%; and some
programs get much smaller, quicker.  Result: across the board
irmprovements in
compile time performance.  Here are the changes in perf/compiler;
the numbers are decreases in compiler bytes-allocated:

  3%   T5837
  7%   parsing001
  9%   T12234
  35%  T9020
  9%   T3064
  13%  T9961
  20%  T13056
  5%   T9872d
  5%   T9872c
  5%   T9872b
  7%   T9872a
  5%   T783
  35%  T12227
  20%  T1969

Plus in perf/should_run

  5%   lazy-bs-alloc

It wasn't as easy as it sounds: I did a raft of preparatory work in
earlier patches.  But it's great!

Reviewers: austin, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D3203
24 files changed:
compiler/simplCore/SimplCore.hs
compiler/simplCore/SimplUtils.hs
testsuite/tests/codeGen/should_compile/debug.stdout
testsuite/tests/deriving/perf/all.T
testsuite/tests/indexed-types/should_compile/T7837.stderr
testsuite/tests/perf/compiler/T4007.stdout
testsuite/tests/perf/compiler/all.T
testsuite/tests/perf/haddock/all.T
testsuite/tests/perf/should_run/all.T
testsuite/tests/simplCore/should_compile/Makefile
testsuite/tests/simplCore/should_compile/T10181.hs
testsuite/tests/simplCore/should_compile/T3772.stdout
testsuite/tests/simplCore/should_compile/T4138.stdout
testsuite/tests/simplCore/should_compile/T7785.hs
testsuite/tests/simplCore/should_compile/T8848.hs
testsuite/tests/simplCore/should_compile/T8848.stderr [deleted file]
testsuite/tests/simplCore/should_compile/T9509.stdout
testsuite/tests/simplCore/should_compile/T9509a.hs
testsuite/tests/simplCore/should_compile/all.T
testsuite/tests/simplCore/should_compile/rule2.stderr
testsuite/tests/simplCore/should_run/T7611.hs
testsuite/tests/simplCore/should_run/simplrun002.hs
testsuite/tests/simplCore/should_run/simplrun008.hs
testsuite/tests/th/TH_Roles2.stderr