[Git][ghc/ghc][wip/con-info] More memory fix

Matthew Pickering gitlab at gitlab.haskell.org
Fri Nov 6 17:49:45 UTC 2020



Matthew Pickering pushed to branch wip/con-info at Glasgow Haskell Compiler / GHC


Commits:
eb5cae12 by Matthew Pickering at 2020-11-06T17:49:28+00:00
More memory fix

- - - - -


1 changed file:

- compiler/GHC/CoreToStg.hs


Changes:

=====================================
compiler/GHC/CoreToStg.hs
=====================================
@@ -52,7 +52,7 @@ import GHC.Builtin.Names   ( unsafeEqualityProofName )
 import GHC.Data.Maybe
 
 import Data.List.NonEmpty (nonEmpty, toList)
-import Control.Monad (ap)
+import Control.Monad (when, ap)
 import qualified Data.Set as Set
 import Control.Monad.Trans.RWS
 import GHC.Types.Unique.Map
@@ -952,7 +952,7 @@ incDc dc = CtsM $ \dflags _ _ -> if not (gopt Opt_DistinctConstructorTables dfla
           return (fst . head <$> r)
 
 recordStgIdPosition :: Id -> Maybe (RealSrcSpan, String) -> Maybe (RealSrcSpan, String) -> CtsM ()
-recordStgIdPosition id best_span ss = CtsM $ \dflags _ _ -> do
+recordStgIdPosition id best_span ss = CtsM $ \dflags _ _ -> when (gopt Opt_InfoTableMap dflags) $ do
   cc <- ask
   let tyString = showPpr dflags (idType id)
   --pprTraceM "recordStgIdPosition" (ppr id $$ ppr cc $$ ppr ss)



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eb5cae122f9149d3a176f47753016340a2093087
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/20201106/71be53a3/attachment.html>


More information about the ghc-commits mailing list