[commit: ghc] wip/T14152: Implement a dedicated exitfication pass #14152 (7970d58)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 13:23:44 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T14152
Link       : http://ghc.haskell.org/trac/ghc/changeset/7970d58d4a138bed21ce53a886a20f378e6e4284/ghc

>---------------------------------------------------------------

commit 7970d58d4a138bed21ce53a886a20f378e6e4284
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Sat Aug 26 14:35:50 2017 +0200

    Implement a dedicated exitfication pass #14152
    
    The idea is described in #14152, and can be summarized: Float the exit
    path out of a joinrec, so that the simplifier can do more with it.
    See the test case for a nice example.
    
    The floating goes against what the simplifier usually does, hence we
    need to be careful not inline them back.
    
    The position of exitification in the pipeline was chosen after a small
    amount of experimentation, but may need to be improved. For example,
    exitification can allow rewrite rules to fire, but for that it would
    have to happen before the `simpl_phases`.
    
    Together with the next patch, perf.haskell.org reports these nice
    performance wins:
    
    	Nofib allocations    prev         change       gain
    	fannkuch-redux	 78446688	- 99.92%      64608
    	k-nucleotide	109466432	- 91.32%    9502064
    	simple		 72424696	-  5.96%   68109560
    
    	Nofib instruction counts
    	compress2       573354476	+  3.34%  592476104
    	k-nucleotide   2310080537	-  5.59% 2180917263
    	scs	       1979135192	-   3.2% 1915880589
    	simple	        670348375	-   4.9%  637507288
    
    Differential Revision: https://phabricator.haskell.org/D3903


>---------------------------------------------------------------

7970d58d4a138bed21ce53a886a20f378e6e4284
 compiler/basicTypes/Id.hs                          |   6 +-
 compiler/basicTypes/Unique.hs                      |   4 +
 compiler/coreSyn/CoreLint.hs                       |   1 +
 compiler/coreSyn/CoreSyn.hs                        |  10 +-
 compiler/ghc.cabal.in                              |   1 +
 compiler/main/DynFlags.hs                          |   6 +
 compiler/simplCore/CoreMonad.hs                    |   2 +
 compiler/simplCore/Exitify.hs                      | 403 +++++++++++++++++++++
 compiler/simplCore/SimplCore.hs                    |  13 +
 compiler/simplCore/SimplUtils.hs                   |   1 +
 compiler/simplCore/Simplify.hs                     |   3 +
 docs/users_guide/using-optimisation.rst            |  10 +
 testsuite/tests/simplCore/should_compile/T14152.hs |  23 ++
 .../tests/simplCore/should_compile/T14152.stderr   | 129 +++++++
 .../tests/simplCore/should_compile/T14152a.hs      |   1 +
 .../tests/simplCore/should_compile/T14152a.stderr  | 222 ++++++++++++
 testsuite/tests/simplCore/should_compile/all.T     |   2 +
 17 files changed, 831 insertions(+), 6 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 7970d58d4a138bed21ce53a886a20f378e6e4284


More information about the ghc-commits mailing list