[commit: ghc] master: No join-point from an INLINE function with wrong arity (a7dbafe)

git at git.haskell.org git at git.haskell.org
Fri Mar 17 17:47:53 UTC 2017


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

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

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

commit a7dbafe9292212f3cbc21be42eb326ab0701db7e
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Mar 17 16:25:41 2017 +0000

    No join-point from an INLINE function with wrong arity
    
    The main payload of this patch is NOT to make a join-point
    from a function with an INLINE pragma and the wrong arity;
    see Note [Join points and INLINE pragmas] in CoreOpt.
    This is what caused Trac #13413.
    
    But we must do the exact same thing in simpleOptExpr,
    which drove me to the following refactoring:
    
    * Move simpleOptExpr and simpleOptPgm from CoreSubst to a new
      module CoreOpt along with a few others (exprIsConApp_maybe,
      pushCoArg, etc)
    
      This eliminates a module loop altogether (delete
      CoreArity.hs-boot), and stops CoreSubst getting too huge.
    
    * Rename Simplify.matchOrConvertToJoinPoint
         to joinPointBinding_maybe
      Move it to the new CoreOpt
      Use it in simpleOptExpr as well as in Simplify
    
    * Define CoreArity.joinRhsArity and use it


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

a7dbafe9292212f3cbc21be42eb326ab0701db7e
 compiler/coreSyn/CoreArity.hs                      |   13 +-
 compiler/coreSyn/CoreArity.hs-boot                 |    6 -
 compiler/coreSyn/{CoreSubst.hs => CoreOpt.hs}      |  900 +++-------------
 compiler/coreSyn/CoreSubst.hs                      | 1084 +-------------------
 compiler/coreSyn/CoreSyn.hs                        |    5 +
 compiler/coreSyn/CoreUnfold.hs                     |    2 +-
 compiler/deSugar/Desugar.hs                        |    4 +-
 compiler/deSugar/DsBinds.hs                        |    2 +-
 compiler/ghc.cabal.in                              |    1 +
 compiler/ghc.mk                                    |    1 +
 compiler/main/GhcPlugins.hs                        |    3 +-
 compiler/prelude/PrelRules.hs                      |    2 +-
 compiler/simplCore/Simplify.hs                     |   30 +-
 compiler/specialise/Rules.hs                       |    1 +
 compiler/specialise/Specialise.hs                  |    3 +-
 testsuite/tests/simplCore/should_compile/T13413.hs |   19 +
 testsuite/tests/simplCore/should_compile/all.T     |    1 +
 17 files changed, 173 insertions(+), 1904 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 a7dbafe9292212f3cbc21be42eb326ab0701db7e


More information about the ghc-commits mailing list