[GHC] #14152: Float exit paths out of recursive functions

GHC ghc-devs at haskell.org
Fri Aug 25 12:14:51 UTC 2017


#14152: Float exit paths out of recursive functions
-------------------------------------+-------------------------------------
        Reporter:  nomeata           |                Owner:  (none)
            Type:  task              |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:  JoinPoints
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #14137 #10918     |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by nomeata):

 >  And I'd suggest NOT doing loopification with every occurrence analysis;
 that feels far too often to me.

 The check of whether loopification can be done is pretty cheap, and falls
 out of Occurence Analysis anyways: I just check whether the occurrence
 info indicates that this is a recursive function that admits
 loopification:
 {{{
     RecursiveTailCalled join_arity <- tailCallInfo occ
 }}}
 So don’t see a reason to check this every time. Once a binding is
 loopified, it is a recursive join point, and loopification does not look
 at it any more.

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


More information about the ghc-tickets mailing list