[GHC] #14827: Recognize when inlining would create a join point

GHC ghc-devs at haskell.org
Wed Feb 21 10:03:25 UTC 2018


#14827: Recognize when inlining would create a join point
-------------------------------------+-------------------------------------
        Reporter:  ersetzen          |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:  JoinPoints
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Thanks.  But that code does not look too bad to me. Yes `shouldFloat` is
 not floated, but it's just a loop, so floating would not really change its
 performance.

 The badness is perhaps, that `lvl_s33v :: Bool` is allocated (as a thunk)
 on every iteration of `wloop`.

 Can you show the 20x faster code?  Perhaps by removing the pragmas or
 something?

 Incidentally, Joachim's exitification pass (in HEAD and 8.4) will remove
 the inefficient thunk for `lvl_s33v`. Does it go 20x faster?

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


More information about the ghc-tickets mailing list