[GHC] #12274: GHC panic: simplifier ticks exhausted
GHC
ghc-devs at haskell.org
Tue Jul 19 22:46:57 UTC 2016
#12274: GHC panic: simplifier ticks exhausted
-------------------------------------+-------------------------------------
Reporter: mrkkrp | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Linux | Architecture: x86_64
Type of failure: Compile-time | (amd64)
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
GHC 7.10 makes specialised versions of imported overloaded functions, at
least if it can see its inlining.
In the example
* `mymap` is overloaded, and is small, so its inlining is visible to
module `Test`
* `mymap` is called at type `Integer` in `Test` so GHC makes specialised
copy, and adds a local RULE to rewrite `mymap Integer` to `$smymap`.
* The `fmap` rule fires twice, once in the RHS of `$smymap` and once in
its (small) unfolding.
* But when GHC encounters the call to `mymap` is just inlines it anyway,
before thinking about rules. That exposes another call to `fmap` so the
rule fires again.
Because `mymap` inlines, all the specalisation is in vain. How to avoid
that? Maybe one round of simplification so that outright inlining
precedes any attempt to specialise.
Whether this is the original problem, I'm not sure.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12274#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list