[Git][ghc/ghc][wip/mpickering-hannes] Eliminate name thunk in declaration fingerprinting

Hannes Siebenhandl (@fendor) gitlab at gitlab.haskell.org
Wed Mar 27 15:39:05 UTC 2024



Hannes Siebenhandl pushed to branch wip/mpickering-hannes at Glasgow Haskell Compiler / GHC


Commits:
42ce32c8 by Fendor at 2024-03-27T15:55:24+01:00
Eliminate name thunk in declaration fingerprinting

Thunk analysis showed that we have about 100_000 thunks (in agda and
`-fwrite-simplified-core`) pointing to the name of the name decl.
Forcing this thunk fixes this issue.

- - - - -


1 changed file:

- compiler/GHC/IfaceToCore.hs


Changes:

=====================================
compiler/GHC/IfaceToCore.hs
=====================================
@@ -957,7 +957,7 @@ tc_iface_decl_fingerprint :: Bool                    -- Don't load pragmas into
 tc_iface_decl_fingerprint ignore_prags (_version, decl)
   = do  {       -- Populate the name cache with final versions of all
                 -- the names associated with the decl
-          let main_name = ifName decl
+          let !main_name = ifName decl
 
         -- Typecheck the thing, lazily
         -- NB. Firstly, the laziness is there in case we never need the



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/42ce32c800b6c22c150cde35e7db66da61fa0085
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/20240327/f253a62d/attachment-0001.html>


More information about the ghc-commits mailing list