
#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): I added the join-point related line here: {{{ occAnalNonRecRhs env bndr bndrs body = occAnalLamOrRhs rhs_env bndrs body where -- See Note [Cascading inlines] env1 | certainly_inline = env | Just _ <- willBeJoinId_maybe bndr = env | otherwise = rhsCtxt env }}} to set `env` instead of `rhsCtxt`, and verified that it matches `lvl6` in the example above. But it did not cause any effect. (The desired effect would be that `ds5` gets inlined into `lvl6`, so that the remaining uses of `ds5`, all in `joinrec safe`, are tail-calls and `ds5` gets turned into a join point. Right?) I am attaching the Haskell’ification of the source code above that I was using for testing. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14137#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler