[GHC] #12963: Give -fexpose-all-unfoldings the same semantics as INLINABLE on each function

GHC ghc-devs at haskell.org
Mon Dec 12 17:09:41 UTC 2016


#12963: Give -fexpose-all-unfoldings the same semantics as INLINABLE on each
function
-------------------------------------+-------------------------------------
        Reporter:  MikolajKonarski   |                Owner:
            Type:  feature request   |               Status:  infoneeded
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:  Inlining
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #12962 #12463     |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 > Feature request: give `-fexpose-all-unfoldings` the same semantics as
 INLINABLE on each function.

 I don't think we should do this.

 * `-fexpose-all-unfoldings` has no effect on the optimisation pipeline; it
 just arranges that, at the end of the pipeline all the unfoldings for all
 functions are put into the interface file.

 * `INLINABLE` is quite different. It says to snapshot (essentially the
 source code of) the RHS of the function, and make it available for
 inlining and/or specialisation at call sites.  So it could have a major
 effect on the optimisation pipeline.  (I'd prefer that it was called
 `SPECIALISABLE`.)

 Anyway I don't think it'd be a good idea to make them the same.  If you
 want ''all'' the user-written top-level functions to be `INLINABLE`, we'll
 need a way to say just that; a reasonable feature request.  Perhaps `{-#
 SPECIALISABLE_ALL #-}`?

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


More information about the ghc-tickets mailing list