[commit: ghc] late-dmd: O2 now runs another demand analysis before CorePrep (fixes #7782) (2eaf46f)

Nicolas Frisby nicolas.frisby at gmail.com
Fri Apr 12 17:05:40 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : late-dmd

https://github.com/ghc/ghc/commit/2eaf46fb1bb8c661c03f3e5e80622207ef2509d9

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

commit 2eaf46fb1bb8c661c03f3e5e80622207ef2509d9
Author: Nicolas Frisby <nicolas.frisby at gmail.com>
Date:   Thu Mar 28 15:34:00 2013 +0000

    O2 now runs another demand analysis before CorePrep (fixes #7782)
    
    Its specific flag is -flate-dmd-anal
    
    The bulk of this patch merely simplifies the treatment of wrappers in
    inteface files. In particular, the body of a wrapper is now encoded
    (just like any other InlineStable) instead regenerating the wrapper
    from its strictness signature and worker id. Consequences:
    
      0) simplifies a special case; there's plenty of knock-on code
         elimination from no longer having ids in UnfoldingSource
    
      1) increases the size of .hi (some significantly, esp GHC.Classes)
    
      2) increases compile time a bit (eg ~ +1% over nofib)
    
      3) accomodates the late demand analysis: the previous treatment of
         wrappers in interface files caused CoreLint errors when combined
         with the second demand analysis

 compiler/coreSyn/CoreSubst.lhs   | 27 ++-------------
 compiler/coreSyn/CoreSyn.lhs     | 14 ++++----
 compiler/coreSyn/CoreTidy.lhs    |  7 +---
 compiler/coreSyn/CoreUnfold.lhs  |  6 ++--
 compiler/coreSyn/PprCore.lhs     |  2 +-
 compiler/iface/BinIface.hs       | 23 ++++---------
 compiler/iface/IfaceSyn.lhs      | 12 ++-----
 compiler/iface/MkIface.lhs       |  7 ++--
 compiler/iface/TcIface.lhs       | 74 +++++++++++++++++++++-------------------
 compiler/main/DynFlags.hs        |  6 ++++
 compiler/main/TidyPgm.lhs        |  5 ---
 compiler/simplCore/OccurAnal.lhs |  2 +-
 compiler/simplCore/SimplCore.lhs | 11 +++++-
 compiler/simplCore/Simplify.lhs  |  7 ++--
 compiler/stranal/WorkWrap.lhs    | 31 +++--------------
 15 files changed, 90 insertions(+), 144 deletions(-)


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

    git show 2eaf46fb1bb8c661c03f3e5e80622207ef2509d9



More information about the ghc-commits mailing list