diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-01-26 16:01:04 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-01-26 16:01:04 +0000 |
commit | 46a772f8efb7aa9d350227e8fd5d5809757c3f1e (patch) | |
tree | e12beccf2317e53f0a3b8fe3715e89da2d719cd4 /compiler/cmm/CmmPipeline.hs | |
parent | 88745c9120f408e53ad1de2489963ede2ac9a668 (diff) | |
download | haskell-46a772f8efb7aa9d350227e8fd5d5809757c3f1e.tar.gz |
Run the complete backend (Stg -> .S) incrementally on each StgBinding
This is so that we can process the Stg code in constant space. Before
we were generating all the C-- up front, leading to a large space
leak.
I haven't converted the LLVM or C back ends to the incremental scheme,
but it's not hard to do.
Diffstat (limited to 'compiler/cmm/CmmPipeline.hs')
-rw-r--r-- | compiler/cmm/CmmPipeline.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/cmm/CmmPipeline.hs b/compiler/cmm/CmmPipeline.hs index 763afc9d12..7af9f5729d 100644 --- a/compiler/cmm/CmmPipeline.hs +++ b/compiler/cmm/CmmPipeline.hs @@ -56,10 +56,10 @@ import StaticFlags -- we actually need to do the initial pass. cmmPipeline :: HscEnv -- Compilation env including -- dynamic flags: -dcmm-lint -ddump-cps-cmm - -> (TopSRT, [CmmGroup]) -- SRT table and accumulating list of compiled procs + -> TopSRT -- SRT table and accumulating list of compiled procs -> CmmGroup -- Input C-- with Procedures - -> IO (TopSRT, [CmmGroup]) -- Output CPS transformed C-- -cmmPipeline hsc_env (topSRT, rst) prog = + -> IO (TopSRT, CmmGroup) -- Output CPS transformed C-- +cmmPipeline hsc_env topSRT prog = do let dflags = hsc_dflags hsc_env -- showPass dflags "CPSZ" @@ -77,7 +77,7 @@ cmmPipeline hsc_env (topSRT, rst) prog = dumpIfSet_dyn dflags Opt_D_dump_cps_cmm "Post CPS Cmm" (pprPlatform (targetPlatform dflags) cmms) - return (topSRT, cmms : rst) + return (topSRT, cmms) {- [Note global fuel] ~~~~~~~~~~~~~~~~~~~~~ |