[commit: ghc] ghc-8.2: No join-point from an INLINE function with wrong arity (ba29313)
git at git.haskell.org
git at git.haskell.org
Tue Mar 21 14:52:38 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.2
Link : http://ghc.haskell.org/trac/ghc/changeset/ba293130a71662ded2f36ec902bc275b0adaa391/ghc
>---------------------------------------------------------------
commit ba293130a71662ded2f36ec902bc275b0adaa391
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
(cherry picked from commit a7dbafe9292212f3cbc21be42eb326ab0701db7e)
>---------------------------------------------------------------
ba293130a71662ded2f36ec902bc275b0adaa391
compiler/coreSyn/CoreArity.hs | 13 +-
compiler/coreSyn/CoreArity.hs-boot | 6 -
compiler/coreSyn/{CoreSubst.hs => CoreOpt.hs} | 904 +++-------------
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, 175 insertions(+), 1906 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 ba293130a71662ded2f36ec902bc275b0adaa391
More information about the ghc-commits
mailing list