summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authornineonine <mail4chemik@gmail.com>2022-02-10 00:10:19 -0800
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-02-16 05:29:08 -0500
commit316312ecd12831f22bd8f7a8aa229c045bbbbedc (patch)
tree46a0257f83434eadd364a89a12ff313a5264a965 /compiler
parent74bf9bb5b83e5ff335847fc2e1d3def413e7df90 (diff)
downloadhaskell-316312ecd12831f22bd8f7a8aa229c045bbbbedc.tar.gz
ghci: fix -ddump-stg-cg (#21052)
The pre-codegen Stg AST dump was not available in ghci because it was performed in 'doCodeGen'. This was now moved to 'coreToStg' area.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/GHC/Driver/Main.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs
index b07d566a5b..d0d29a83e7 100644
--- a/compiler/GHC/Driver/Main.hs
+++ b/compiler/GHC/Driver/Main.hs
@@ -1803,9 +1803,6 @@ doCodeGen hsc_env this_mod denv data_tycons
tmpfs = hsc_tmpfs hsc_env
platform = targetPlatform dflags
- putDumpFileMaybe logger Opt_D_dump_stg_cg "CodeGenInput STG:" FormatSTG
- (pprGenStgTopBindings (initStgPprOpts dflags) stg_binds_w_fvs)
-
-- Do tag inference on optimized STG
(!stg_post_infer,export_tag_info) <-
{-# SCC "StgTagFields" #-} inferTags dflags logger this_mod stg_binds_w_fvs
@@ -1891,6 +1888,9 @@ myCoreToStg logger dflags ictxt for_bytecode this_mod ml prepd_binds = do
stg2stg logger ictxt (initStgPipelineOpts dflags for_bytecode)
this_mod stg_binds
+ putDumpFileMaybe logger Opt_D_dump_stg_cg "CodeGenInput STG:" FormatSTG
+ (pprGenStgTopBindings (initStgPprOpts dflags) stg_binds_with_fvs)
+
return (stg_binds_with_fvs, denv, cost_centre_info)
{- **********************************************************************