RTS: Refactor "portable inline" macros

Authored by hvr on Mar 25 2016, 3:08 PM.



Turns out the current macros for gnu90-style inline
semantics stopped working with GCC 5
(and possibly also Apple's GCC) which switched on
GNUC_STDC_INLINE by default falling back to using the
suboptimal static inline mode.

However, C99 supports an equivalent (as far as our
use-case is concerned) extern inline mode.

This patch also removes the MSVC case as VS2015 is supposed
to finally catch up to C99 (and C11), so we don't need any
special care anymore.

Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
hvr updated this revision to Diff 7054.Mar 25 2016, 3:08 PM
hvr retitled this revision from to RTS: Refactor "portable inline" macros.
hvr updated this object.
hvr edited the test plan for this revision. (Show Details)
hvr added reviewers: erikd, gracjan.
erikd accepted this revision.Mar 25 2016, 4:20 PM
erikd edited edge metadata.


This revision is now accepted and ready to land.Mar 25 2016, 4:20 PM
carter added a subscriber: carter.Mar 25 2016, 4:32 PM

So if I built ghc 8 branch with gcc 5/6 before this patch , there's potentially some perf regressions? How would I measure or isolate that / what programs would make it observable ?

austin accepted this revision.Mar 25 2016, 5:50 PM
austin edited edge metadata.

I'll buy it.


This revision was automatically updated to reflect the committed changes.
hvr added a comment.Mar 26 2016, 3:06 AM

alright... I've pushed to GHC HEAD, so we should see soon if any GCC/Clang combination barfs on this one... (I tried a few combinations I could get my hands on, but you never know...)