
#12962: No automatic SCC annotations for functions marked INLINABLE -------------------------------------+------------------------------------- Reporter: MikolajKonarski | Owner: dfeuer Type: bug | Status: new Priority: normal | Milestone: 8.4.1 Component: Profiling | Version: 8.0.1 Resolution: | Keywords: Inlining, | newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12963 | Differential Rev(s): Phab:D3550 Wiki Page: | -------------------------------------+------------------------------------- Comment (by dfeuer): Simon, there's a Note [inline sccs] about why we don't have them for `INLINE` things: {{{#!hs -- It should be reasonable to add ticks to INLINE functions; however -- currently this tickles a bug later on because the SCCfinal pass -- does not look inside unfoldings to find CostCentres. It would be -- difficult to fix that, because SCCfinal currently works on STG and -- not Core (and since it also generates CostCentres for CAFs, -- changing this would be difficult too). -- -- Another reason not to add ticks to INLINE functions is that this -- sometimes handy for avoiding adding a tick to a particular function -- (see #6131) -- -- So for now we do not add any ticks to INLINE functions at all. }}} Even if dealing with ticks through inlining isn't feasible, this whole thing seems a bit surprising to me because `INLINE` bindings aren't always inlined, and non-`INLINE` bindings often are. Using an `INLINE` annotation for its side effect on SCC annotations seems rather ugly. The current proposed change just does what osa1 seems to suggest, limiting the exclusion to `INLINE` rather than to both `INLINE` and `INLINABLE` in `Coverage.hs`. This appears to affect ticks generally, rather than SCC ticks specifically, but that ''seems'' to my uneducated eye to be the case for the various auto-add options too (see `shouldTickBind` and `mkDensity`). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12962#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler