[Git][ghc/ghc][wip/tyconapp-opts] Inline expandSynTyCon_maybe

Ben Gamari gitlab at gitlab.haskell.org
Wed Apr 8 23:55:16 UTC 2020



Ben Gamari pushed to branch wip/tyconapp-opts at Glasgow Haskell Compiler / GHC


Commits:
fae67360 by Ben Gamari at 2020-04-08T19:54:43-04:00
Inline expandSynTyCon_maybe

This is necessary to avoid some needless allocation since we currently
lack nested CPR on sums.

Metric Decrease:
   T12227
   T12545
   T12707
   T14683
   T3064
   T5631
   T5642
   T9020
   T9872a

- - - - -


1 changed file:

- compiler/GHC/Core/TyCon.hs


Changes:

=====================================
compiler/GHC/Core/TyCon.hs
=====================================
@@ -2296,6 +2296,9 @@ expandSynTyCon_maybe tc tys
               LT -> Nothing
    | otherwise
    = Nothing
+{-# INLINE expandSynTyCon_maybe #-}
+-- Inline to avoid allocation of tuples due to lack of nested CPR on sums.
+-- Particularly relevant to coreView and tcView, which are hammered.
 
 ----------------
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fae673605c27db4ece0825ff533a7dcd4f32312d

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fae673605c27db4ece0825ff533a7dcd4f32312d
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200408/769b4b6b/attachment.html>


More information about the ghc-commits mailing list