summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2020-02-06 19:04:35 +0100
committerAndreas Klebinger <klebinger.andreas@gmx.at>2020-02-06 19:04:35 +0100
commit09e45c3e35b8699a9349272c168fee073d472ef5 (patch)
tree82194ce6ffba8975f7c5ee91ea94412d125d72c8
parente8004e5d1e993363a89b0107380604c5bc02be6b (diff)
downloadhaskell-wip/andreask/fix_stg-final.tar.gz
Fix -ddump-stg-final.wip/andreask/fix_stg-final
Once again make sure this dumps the STG used for codegen.
-rw-r--r--compiler/GHC/Stg/Pipeline.hs2
-rw-r--r--compiler/main/HscMain.hs3
2 files changed, 2 insertions, 3 deletions
diff --git a/compiler/GHC/Stg/Pipeline.hs b/compiler/GHC/Stg/Pipeline.hs
index de426adad7..4b6a36536f 100644
--- a/compiler/GHC/Stg/Pipeline.hs
+++ b/compiler/GHC/Stg/Pipeline.hs
@@ -66,8 +66,6 @@ stg2stg dflags this_mod binds
-- preserve the order or only create minimal recursive groups, so a
-- sorting pass is necessary.
; let binds_sorted = depSortStgPgm this_mod binds'
- ; dump_when Opt_D_dump_stg_final "Final STG:" binds_sorted
-
; return binds_sorted
}
diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs
index 3bfd435b00..92a505e0a3 100644
--- a/compiler/main/HscMain.hs
+++ b/compiler/main/HscMain.hs
@@ -1557,6 +1557,8 @@ doCodeGen hsc_env this_mod data_tycons
let stg_binds_w_fvs = annTopBindingsFreeVars stg_binds
+ dumpIfSet_dyn dflags Opt_D_dump_stg_final "Final STG:" FormatSTG (pprGenStgTopBindings stg_binds_w_fvs)
+
let cmm_stream :: Stream IO CmmGroup ()
-- See Note [Forcing of stg_binds]
cmm_stream = stg_binds_w_fvs `seqList` {-# SCC "StgToCmm" #-}
@@ -1588,7 +1590,6 @@ doCodeGen hsc_env this_mod data_tycons
return (Stream.mapM dump2 pipeline_stream)
-
myCoreToStg :: DynFlags -> Module -> CoreProgram
-> IO ( [StgTopBinding] -- output program
, CollectedCCs ) -- CAF cost centre info (declared and used)