Skip to content
Snippets Groups Projects
Commit 2131143f authored by Cheng Shao's avatar Cheng Shao :beach:
Browse files

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.

(cherry picked from commit 6346c669)
(cherry picked from commit e5a1dd43)
parent 6bee4d8a
No related branches found
No related tags found
No related merge requests found
......@@ -2074,10 +2074,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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment