INLINE pragmas

Thomas Miedema thomasmiedema at gmail.com
Thu Jul 30 11:10:16 UTC 2015


>
> INLINE[n]    becomes INLINEFROM[n]
> NOINLINE[n]  becomes NOINLINEBEFORE[n]

INLINE[~n]   becomes INLINEBEFORE[n]
> NOINLINE[~n] becomes NOINLINEFROM[n]



Still not great, because INLINE[n] doesn't inline before phase n either.
Maybe we should make that explicit, and use 2 separate pragmas:

INLINE[n]    becomes NO_INLINE_BEFORE[n], INLINE_FROM[n]
NOINLINE[n]  becomes NO_INLINE_BEFORE[n]
INLINE[~n]   becomes NO_INLINE_FROM[n], INLINE_BEFORE[n]
NOINLINE[~n] becomes NO_INLINE_FROM[n]

(a combination of NO_INLINE_BEFORE[n] and INLINE_BEFORE[n], or
NO_INLINE_FROM[n] and INLINE_FROM[n], would be an error)

If that is too verbose, we could make the 'no inline' part implicit:

INLINE[n]    becomes INLINE_FROM[n]
NOINLINE[n]  becomes INLINEABLE_FROM[n]
INLINE[~n]   becomes INLINE_BEFORE[n]
NOINLINE[~n] becomes INLINEABLE_BEFORE[n]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20150730/910c8c15/attachment.html>


More information about the ghc-devs mailing list