[commit: ghc] ghc-8.2: Improve SpecConstr when there are many opportunities (324eeb9)

git at git.haskell.org git at git.haskell.org
Tue May 2 13:41:09 UTC 2017


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

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/324eeb9448a4e854003dd9b5709e1939da25cb12/ghc

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

commit 324eeb9448a4e854003dd9b5709e1939da25cb12
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Apr 27 11:15:00 2017 +0100

    Improve SpecConstr when there are many opportunities
    
    SpecConstr has -fspec-contr-count=N which limits the maximum
    number of specialisations we make for any particular function.
    But until now, if that limit was exceeded we discarded all the
    candidates!  So adding a new specialisaiton opportunity (by
    adding a new call site, or improving the optimiser) could result
    in less specialisation and worse performance.
    
    This patch instead picks the top N candidates, resulting in
    less brittle behaviour.
    
    See Note [Choosing patterns].
    
    (cherry picked from commit c46a600f320b25e0ac73107acdb12a33d7fbd9c3)


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

324eeb9448a4e854003dd9b5709e1939da25cb12
 compiler/specialise/SpecConstr.hs | 156 +++++++++++++++++++++++++++-----------
 1 file changed, 113 insertions(+), 43 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 324eeb9448a4e854003dd9b5709e1939da25cb12


More information about the ghc-commits mailing list