diff options
Diffstat (limited to 'compiler/GHC/Driver/Main.hs')
-rw-r--r-- | compiler/GHC/Driver/Main.hs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs index a01c559c80..3605b4ac5a 100644 --- a/compiler/GHC/Driver/Main.hs +++ b/compiler/GHC/Driver/Main.hs @@ -2,6 +2,7 @@ {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE TupleSections #-} +{-# LANGUAGE GADTs #-} {-# OPTIONS_GHC -fprof-auto-top #-} @@ -236,6 +237,9 @@ import Control.DeepSeq (force) import Data.Bifunctor (first) import GHC.Data.Maybe import GHC.Driver.Env.KnotVars +import GHC.Types.Name.Set (NonCaffySet) +import GHC.Driver.GenerateCgIPEStub (generateCgIPEStub) + {- ********************************************************************** %* * @@ -1756,7 +1760,7 @@ doCodeGen hsc_env this_mod denv data_tycons Nothing -> StgToCmm.codeGen logger tmpfs Just h -> h - let cmm_stream :: Stream IO CmmGroup (CStub, ModuleLFInfos) + let cmm_stream :: Stream IO CmmGroup ModuleLFInfos -- See Note [Forcing of stg_binds] cmm_stream = stg_binds_w_fvs `seqList` {-# SCC "StgToCmm" #-} stg_to_cmm dflags this_mod denv data_tycons cost_centre_info stg_binds_w_fvs hpc_info @@ -1774,21 +1778,21 @@ doCodeGen hsc_env this_mod denv data_tycons ppr_stream1 = Stream.mapM dump1 cmm_stream - pipeline_stream :: Stream IO CmmGroupSRTs CgInfos + pipeline_stream :: Stream IO CmmGroupSRTs (NonCaffySet, ModuleLFInfos) pipeline_stream = do - (non_cafs, (used_info, lf_infos)) <- + (non_cafs, lf_infos) <- {-# SCC "cmmPipeline" #-} Stream.mapAccumL_ (cmmPipeline hsc_env) (emptySRT this_mod) ppr_stream1 <&> first (srtMapNonCAFs . moduleSRTMap) - return CgInfos{ cgNonCafs = non_cafs, cgLFInfos = lf_infos, cgIPEStub = used_info } + return (non_cafs, lf_infos) dump2 a = do unless (null a) $ putDumpFileMaybe logger Opt_D_dump_cmm "Output Cmm" FormatCMM (pdoc platform a) return a - return (Stream.mapM dump2 pipeline_stream) + return $ Stream.mapM dump2 $ generateCgIPEStub hsc_env this_mod denv pipeline_stream myCoreToStgExpr :: Logger -> DynFlags -> InteractiveContext -> Bool |