[GHC] #13144: FoatOut is not floating bottoming expressions properly

GHC ghc-devs at haskell.org
Tue Feb 7 14:00:58 UTC 2017


#13144: FoatOut is not floating bottoming expressions properly
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
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 Simon Peyton Jones <simonpj@…>):

 In [changeset:"a0174d2264358c5930a54e372d5d3ab5e713b87a/ghc" a0174d2/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="a0174d2264358c5930a54e372d5d3ab5e713b87a"
 Do not inline bottoming things

 If a function seems small, worker/wrapper won't split it; instead
 it turns it into an INLINE function.

 But if it's a /bottoming/ function that's a bad idea.  We want
 don't want to inline bottoming functions unless they are /really/
 small (smaller than the call itself) and that's handled by a
 different branch in certainlyWillInline.

 So this patch adds a not-bottom test to the UnfIfGoodArgs case of
 certainlyWillInline.

 No big perf effect, but this will tend to keep error code out of
 functions, and hence make them a bit more likely to inline.

 I fell over this when fiddling with #13144
 }}}

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


More information about the ghc-tickets mailing list