[GHC] #14068: Loopification using join points

GHC ghc-devs at haskell.org
Thu Jan 25 11:31:50 UTC 2018


#14068: Loopification using join points
-------------------------------------+-------------------------------------
        Reporter:  nomeata           |                Owner:  nomeata
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:  JoinPoints
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13966 #14067     |  Differential Rev(s):  Phab:D3811
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Joachim, where are we on loopification?  I think you have `wip/T14068`
 with this commit
 {{{
 commit b4ab3a5f1fa051be9c5689f7ecef16458b2d700d
 Author: Joachim Breitner <mail at joachim-breitner.de>
 Date:   Fri Aug 4 15:34:11 2017 -0400

     Prevent inlining of loopified programs

     Previously, a recursive function is not inlineable. After
 loopification,
     it turns into a non-recursive function, and suddenly it is. While this
     is in general desirable, it has many knock-on effects, which makes it
     hard to evaluate and debug loopification. Therefore, this commit
 (tries to)
     prevent this inlining. When this results in no unfixable regressions,
     then we can tackle the next step.

     It is surprisingly hard to reliably prevent inlining, it seems, so I
     have been playing whack-a-mole a bit:
      * simpl_binds has two copies of the ids around, one in the env and
 one
        in the AST. If maybeLoopify changes only one of them, then things
 go wrong.
        Worked-around that for now, but probably not ideal.
        TODO: Apply maybeLoopify before entering simplTopBinds
      * Also, worker-wrapper needs to preserve the no-inlining better
 }}}
 But I think it's in limbo?  Or has it been overtaken by events?

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


More information about the ghc-tickets mailing list