[GHC] #14137: Do more inlining into non-recursive join points

GHC ghc-devs at haskell.org
Sat Aug 19 13:44:09 UTC 2017


#14137: Do more inlining into non-recursive join points
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  nomeata
            Type:  bug               |               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:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by nomeata):

 Replying to [comment:11 nomeata]:
 > >  Now lvl6 will be inlined at its single call site.
 >
 > Indeed the change to `preInlineUnconditionally` has the prognosed
 effect. I passed it to `perf.haskell.org` for performance evaluation.

 Two changes observed: Runtime of `scs` improved by 3% (could be noise).
 But compiler performance regressed slightly (around +1% allocations in a
 few cases). Biggest loser is the parsing compiler performance benchmark
 `tests/alloc/parsing001`, 3% increase of allocations. I am not inclined to
 hunt down that regression (I’d require building GHC twice with identical
 settings and staring at lots of ticky profiles, and then staring at core
 code), I hope that’s ok. My completely unfounded gut feeling is that a
 join-point is inlined into a recursive function, and then floated out
 again in a form that is no longer a join point.

 Given these results, do you want me to write a Note and push it to master,
 or not do that just yet and maybe first follow the breadcrumb “we'd like
 the FloatOut pass not to float out tail-calls from a joinrec”?

 (But see above why it seems to me that floating out tail-calls from a
 joinrec is very desirable…)

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


More information about the ghc-tickets mailing list