[GHC] #6056: INLINABLE pragma prevents worker-wrapper to happen.

GHC ghc-devs at haskell.org
Wed Nov 20 15:47:36 UTC 2013


#6056: INLINABLE pragma prevents worker-wrapper to happen.
--------------------------------------------+------------------------------
        Reporter:  milan                    |            Owner:  simonpj
            Type:  bug                      |           Status:  new
        Priority:  normal                   |        Milestone:  7.8.1
       Component:  Compiler                 |          Version:  7.4.1
      Resolution:                           |         Keywords:
Operating System:  Unknown/Multiple         |     Architecture:
 Type of failure:  Runtime performance bug  |  Unknown/Multiple
       Test Case:                           |       Difficulty:  Unknown
        Blocking:                           |       Blocked By:
                                            |  Related Tickets:
--------------------------------------------+------------------------------

Comment (by simonpj):

 I agree that it's surprising and undesirable.  The reason it happens is
 this.

 GHC keeps an "`Unfolding` inside each `Id`:
  * For INLINEABLE things it is the original user-written RHS
  * For w/w'd things it is the wrapper function

 But there's only ''one'' `Unfolding` for each `Id`, so we have to choose.
 As you point out, that is a pity.  Solution is probably to keep two
 unfoldings, in effect.  Thanks for pointing  this out so clearly.

 Simon

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/6056#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list