[Git][ghc/ghc][master] compiler: fix -ddump-cmm-raw when compiling .cmm
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Sat Jun 1 13:38:17 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
6346c669 by Cheng Shao at 2024-06-01T09:37:04-04:00
compiler: fix -ddump-cmm-raw when compiling .cmm
This patch fixes missing -ddump-cmm-raw output when compiling .cmm,
which is useful for debugging cmm related codegen issues.
- - - - -
1 changed file:
- compiler/GHC/Driver/Main.hs
Changes:
=====================================
compiler/GHC/Driver/Main.hs
=====================================
@@ -2092,10 +2092,15 @@ hscCompileCmmFile hsc_env original_filename filename output_filename = runHsc hs
putDumpFileMaybe logger Opt_D_dump_cmm "Output Cmm"
FormatCMM (pdoc platform cmmgroup)
- rawCmms <- case cmmToRawCmmHook hooks of
+ rawCmms0 <- case cmmToRawCmmHook hooks of
Nothing -> cmmToRawCmm logger profile (Stream.yield cmmgroup)
Just h -> h dflags Nothing (Stream.yield cmmgroup)
+ let dump a = do
+ unless (null a) $ putDumpFileMaybe logger Opt_D_dump_cmm_raw "Raw Cmm" FormatCMM (pdoc platform a)
+ return a
+ rawCmms = Stream.mapM dump rawCmms0
+
let foreign_stubs _
| not $ null ipe_ents =
let ip_init = ipInitCode do_info_table platform cmm_mod
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6346c669215c797abb977cf875da4e4238f5d064
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6346c669215c797abb977cf875da4e4238f5d064
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/20240601/eb018ef0/attachment-0001.html>
More information about the ghc-commits
mailing list