[GHC] #14844: SpecConstr also non-recursive function
GHC
ghc-devs at haskell.org
Mon Mar 19 19:24:36 UTC 2018
#14844: SpecConstr also non-recursive function
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.5
Resolution: | Keywords: SpecConstr
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by nomeata):
I stared some more at the code, and learned:
* Currently, !SpecConstr does specialize local non-recursive functions,
but not top-level non-recursive functions. Comment in the source code
about that: “Oddly, we don't seem to specialise top-level non-rec
functions”. This can be fixed in `scTopBind`.
* Together with loopification, SpecConstr only specialized everything as
before if it is run twice, with a simplification in between. Otherwise, it
refuses to specialize the outer non-recursive function because it does not
see that its parameters are being scrutinized. I hope this can somehow be
fixed in `SpecConstr`, so that it anticipates the state after
simplifications.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14844#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list