
#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 simonpj): Ha! I tried {{{ module T14137 where f xs = let thunk = length xs j = Just thunk g 0 = j g n = g (n-1) in g 7 }}} Indeed, the inliner does not inline `thunk`, because of the lack of comment:3. But later `FloatIn` does push it inwards (it knows about join points); and the simplifier also knows not to float things out of join points. So all is well. Still, it's more direct to do it right away. I'll do it shortly because I'm meddling there anyway. That's all for this ticket! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14137#comment:21 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler