[Git][ghc/ghc][wip/andreask/opt-getlevity] Apply 1 suggestion(s) to 1 file(s)
Andreas Klebinger (@AndreasK)
gitlab at gitlab.haskell.org
Mon Oct 17 10:19:04 UTC 2022
Andreas Klebinger pushed to branch wip/andreask/opt-getlevity at Glasgow Haskell Compiler / GHC
Commits:
6af67cb7 by sheaf at 2022-10-17T10:19:02+00:00
Apply 1 suggestion(s) to 1 file(s)
- - - - -
1 changed file:
- compiler/GHC/Core/Type.hs
Changes:
=====================================
compiler/GHC/Core/Type.hs
=====================================
@@ -2543,6 +2543,8 @@ getLevity_maybe ty
| Just rep <- getRuntimeRep_maybe ty
, TyConApp tc [lev] <- coreFullView rep
, boxedRepDataConTyCon == tc
+ -- Directly matching on TyConApp after expanding type synonyms
+ -- saves allocations compared to `splitTyConApp_maybe`. See #22254.
= Just lev
| otherwise
= Nothing
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6af67cb77a96f783075e26267360c702443dc7c6
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6af67cb77a96f783075e26267360c702443dc7c6
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/20221017/1170d751/attachment.html>
More information about the ghc-commits
mailing list