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

GHC ghc-devs at haskell.org
Thu Aug 28 11:11:39 UTC 2014


#6056: INLINABLE pragma prevents worker-wrapper to happen.
--------------------------------------------+------------------------------
        Reporter:  milan                    |            Owner:  simonpj
            Type:  bug                      |           Status:  new
        Priority:  normal                   |        Milestone:  7.10.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 Simon Peyton Jones <simonpj@…>):

 In [changeset:"9cf5906b692c31b7ec67856b0859cb0e33770651/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="9cf5906b692c31b7ec67856b0859cb0e33770651"
 Make worker/wrapper work on INLINEABLE things

 This fixes a long-standing bug: Trac #6056.  The trouble was that
 INLINEABLE "used up" the unfolding for the Id, so it couldn't be
 worker/wrapper'd by the strictness analyser.

 This patch allows the w/w to go ahead, and makes the *worker* INLINEABLE
 instead, so it can later be specialised.

 However, that doesn't completely solve the problem, because the dictionary
 argument (which the specialiser treats specially) may be strict and
 hence unpacked by w/w, so now the worker won't be specilialised after all.

 Solution: never unpack dictionary arguments, which is done by the
 isClassTyCon
           test in WwLib.deepSplitProductType_maybe
 }}}

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


More information about the ghc-tickets mailing list