[GHC] #15560: Full laziness destroys opportunities for join points

GHC ghc-devs at haskell.org
Thu Aug 23 22:08:55 UTC 2018


#15560: Full laziness destroys opportunities for join points
-------------------------------------+-------------------------------------
        Reporter:  AndreasK          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.3
  (CodeGen)                          |
      Resolution:                    |             Keywords:  JoinPoints
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #14287            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by AndreasK):

 > However, if the binding can go all the way to the top level, then there
 seems no downside to floating it: we end up with a smaller (and hence
 perhaps more inlinable) function; and the jump to the join point is still
 a nice, efficient jump. What's not to like?

 There are no top level join points as far as I know. (I might be mistaken
 though?)
 Turning them into a top level binding means the calling convention changes
 into the same that is used with regular functions. So we have the overhead
 of register saving, stack checks, layout penalty, the works.

 Limiting them to the top of the RHS instead seems like an advantage. Maybe
 that should already happen and I just hit a bug there? I haven't looked
 too far into the SetLevel machinery.

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


More information about the ghc-tickets mailing list