[commit: ghc] master: Improve SpecConstr when there are many opportunities (c46a600)

git at git.haskell.org git at git.haskell.org
Tue May 2 09:14:28 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/c46a600f320b25e0ac73107acdb12a33d7fbd9c3/ghc

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

commit c46a600f320b25e0ac73107acdb12a33d7fbd9c3
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].


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

c46a600f320b25e0ac73107acdb12a33d7fbd9c3
 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 c46a600f320b25e0ac73107acdb12a33d7fbd9c3


More information about the ghc-commits mailing list