[Git][ghc/ghc][wip/romes/12935] Add traces

Rodrigo Mesquita (@alt-romes) gitlab at gitlab.haskell.org
Fri Jun 21 16:44:29 UTC 2024



Rodrigo Mesquita pushed to branch wip/romes/12935 at Glasgow Haskell Compiler / GHC


Commits:
6d989e10 by Rodrigo Mesquita at 2024-06-21T17:44:23+01:00
Add traces

- - - - -


1 changed file:

- compiler/GHC/Cmm/Pipeline.hs


Changes:

=====================================
compiler/GHC/Cmm/Pipeline.hs
=====================================
@@ -64,7 +64,10 @@ cmmPipeline logger cmm_config srtInfo prog = do
 --
 --   - in the case of a `CmmData`, the unmodified 'CmmDecl' and a 'CAFSet' containing
 cpsTop :: Logger -> Platform -> CmmConfig -> CmmDecl -> IO (Either (CAFEnv, [CmmDecl]) (CAFSet, CmmDataDecl))
-cpsTop _logger platform _ (CmmData section statics) = return (Right (cafAnalData platform statics, CmmData section statics))
+cpsTop logger platform _ (CmmData section statics) = do
+      dumpWith logger Opt_D_dump_cmm_verbose "Pre CPS Data" FormatCMM (pdoc platform (CmmData section statics :: CmmDataDecl))
+      dumpWith logger  Opt_D_dump_cmm_verbose "Post CPS Data" FormatCMM (pdoc platform (cafAnalData platform statics))
+      return (Right (cafAnalData platform statics, CmmData section statics))
 cpsTop logger platform cfg proc =
     do
       ----------- Control-flow optimisations ----------------------------------



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6d989e102a8bde6b9c714ba30f4b8416ba15b748
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/20240621/1d7a42f3/attachment.html>


More information about the ghc-commits mailing list