[GHC] #14068: Loopification using join points

GHC ghc-devs at haskell.org
Fri Feb 23 08:58:31 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
  #14827                             |
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 > We get this code for drop, which does not satisfy the conditions for
 SpecConstr; in particular, drop is not recursive (SpecConstr only creates
 specializations for recursive functions):

 And rightly so!  The new code for `drop` look splendid.  The first
 iteration unboxes the boxed parameter `n`, and then the `joinrec` is a
 tight inner loop that races down the list; it's pretty much identical to
 the `$sdrop` we got before.  So why is this worse than the previous
 version?

 It should be easy enough for me to repro this even without your
 loopification patch, by manually writing the post-loopification code.  If
 you can post that code here I'll be in a better position to help.  Thanks!

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


More information about the ghc-tickets mailing list