[GHC] #12463: SPECIALIZABLE pragma?
GHC
ghc-devs at haskell.org
Sat Sep 24 19:39:33 UTC 2016
#12463: SPECIALIZABLE pragma?
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner:
Type: feature request | Status: new
Priority: low | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords: Inlining
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):
> However, I think the recursive variant is novel (although admittedly
poorly specified).
What is "the recursive variant"?
The Description says:
> If we include an INLINEABLE pragma (as most performance-aware authors
would do) then we can convince GHC to produce an unfolding, but only at
the expense of lowering its inlining cost as wel.
That is not true. INLINABLE does ''not'' reduce the inlining cost. It
merely (and solely) arranges to capture the entire (Core of the) source-
code defnition, including if the function is recursive. No more and no
less.
> We really just want GHC to behave like each use-site's module has a
SPECIALISE pragma for each concrete type that the function is used at.
And that is exactly what INLINABLE does.
I feel I'm missing something.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12463#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list