[commit: ghc] master: Improve Simplifier and SpecConstr behaviour (70ad6e6)

Simon Marlow marlowsd at gmail.com
Wed Feb 2 16:59:20 CET 2011


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/70ad6e6ad6e2b27ccafc5e8af3b22b22d746e614

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

commit 70ad6e6ad6e2b27ccafc5e8af3b22b22d746e614
Author: simonpj at microsoft.com <unknown>
Date:   Mon Jan 31 11:35:29 2011 +0000

    Improve Simplifier and SpecConstr behaviour
    
    Trac #4908 identified a case where SpecConstr wasn't "seeing" a
    specialisation it should easily get.  The solution was simple: see
    Note [Add scrutinee to ValueEnv too] in SpecConstr.
    
    Then it turned out that there was an exactly analogous infelicity in
    the mighty Simplifer too; see Note [Add unfolding for scrutinee] in
    Simplify. This fix is good for Simplify even in the absence of the
    SpecConstr change.  (It arose when I moved the binder- swap stuff to
    OccAnall, not realising that it *remains* valuable to record info
    about the scrutinee of a case expression.  The Note says why.
    
    Together these two changes are unconditionally good.  Better
    simplification, better specialisation. Thank you Max.

 compiler/simplCore/Simplify.lhs    |   95 +++++++++++++++++++++--------------
 compiler/specialise/SpecConstr.lhs |   57 +++++++++++++++-------
 2 files changed, 96 insertions(+), 56 deletions(-)


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

    git show 70ad6e6ad6e2b27ccafc5e8af3b22b22d746e614



More information about the Cvs-ghc mailing list