X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Fmain%2FHscMain.lhs;h=e0d81b76fbeb17b49815b1fd7b9b445a7b5adbcc;hb=6a944ae7fe1e8e2e456c68717188463263f8978f;hp=a334c70027d28ceb86bc935450bc626569f70ed9;hpb=63489d40bdee972656ff115ab2309b809c0e39fc;p=ghc-hetmet.git diff --git a/compiler/main/HscMain.lhs b/compiler/main/HscMain.lhs index a334c70..e0d81b7 100644 --- a/compiler/main/HscMain.lhs +++ b/compiler/main/HscMain.lhs @@ -789,11 +789,8 @@ tryNewCodeGen :: HscEnv -> Module -> [TyCon] -> [Module] -> HpcInfo -> IO [Cmm] tryNewCodeGen hsc_env this_mod data_tycons imported_mods - cost_centre_info stg_binds hpc_info - | not (dopt Opt_TryNewCodeGen (hsc_dflags hsc_env)) - = return [] - | otherwise - = do { let dflags = hsc_dflags hsc_env + cost_centre_info stg_binds hpc_info = + do { let dflags = hsc_dflags hsc_env ; prog <- StgCmm.codeGen dflags this_mod data_tycons imported_mods cost_centre_info stg_binds hpc_info ; dumpIfSet_dyn dflags Opt_D_dump_cmmz "Cmm produced by new codegen" @@ -802,8 +799,8 @@ tryNewCodeGen hsc_env this_mod data_tycons imported_mods ; prog <- return $ map (runTx $ runCmmOpts cmmCfgOptsZ) prog -- Control flow optimisation - -- Note: Have to thread the module's SRT through all the procedures - -- because we greedily build it as we go. + -- We are building a single SRT for the entire module, so + -- we must thread it through all the procedures as we cps-convert them. ; us <- mkSplitUniqSupply 'S' ; let topSRT = initUs_ us emptySRT ; (topSRT, prog) <- foldM (protoCmmCPSZ hsc_env) (topSRT, []) prog