X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FCmmCPSZ.hs;h=aac9372f94931e656f08cf868d5d23d721f002d8;hb=497302c44ad08c6c27d0e15d94a787f332c0cfec;hp=7db4eed07352cbaa4e123ecef975ce9ba0699743;hpb=e367ebeb97b97bc2732202bcfabbbde63f1ec5cd;p=ghc-hetmet.git diff --git a/compiler/cmm/CmmCPSZ.hs b/compiler/cmm/CmmCPSZ.hs index 7db4eed..aac9372 100644 --- a/compiler/cmm/CmmCPSZ.hs +++ b/compiler/cmm/CmmCPSZ.hs @@ -43,12 +43,12 @@ import StaticFlags -- The SRT needs to be threaded because it is grown lazily. protoCmmCPSZ :: HscEnv -- Compilation env including -- dynamic flags: -dcmm-lint -ddump-cps-cmm - -> (TopSRT, [CmmZ]) -- SRT table and + -> (TopSRT, [CmmZ]) -- SRT table and accumulating list of compiled procs -> CmmZ -- Input C-- with Procedures -> IO (TopSRT, [CmmZ]) -- Output CPS transformed C-- protoCmmCPSZ hsc_env (topSRT, rst) (Cmm tops) - | not (dopt Opt_RunCPSZ (hsc_dflags hsc_env)) - = return (topSRT, Cmm tops : rst) -- Only if -frun-cps + | not (dopt Opt_TryNewCodeGen (hsc_dflags hsc_env)) + = return (topSRT, Cmm tops : rst) -- Only if -fnew-codegen | otherwise = do let dflags = hsc_dflags hsc_env showPass dflags "CPSZ" @@ -110,13 +110,13 @@ cpsTop hsc_env (CmmProc h l args g) = -- UGH... manifestSP can require updates to the procPointMap. -- We can probably do something quicker here for the update... procPointMap <- run $ procPointAnalysis procPoints g - gs <- pprTrace "procPointMap" (ppr procPointMap) $ - run $ splitAtProcPoints l callPPs procPoints procPointMap areaMap + dump Opt_D_dump_cmmz "procpoint map" procPointMap + gs <- run $ splitAtProcPoints l callPPs procPoints procPointMap areaMap (CmmProc h l args g) mapM (dump Opt_D_dump_cmmz "after splitting") gs let localCAFs = catMaybes $ map (localCAFInfo cafEnv) gs mbpprTrace "localCAFs" (ppr localCAFs) $ return () - gs <- liftM concat $ run $ foldM (lowerSafeForeignCalls procPoints) [] gs + gs <- liftM concat $ run $ foldM lowerSafeForeignCalls [] gs mapM (dump Opt_D_dump_cmmz "after lowerSafeForeignCalls") gs -- NO MORE GRAPH TRANSFORMATION AFTER HERE -- JUST MAKING INFOTABLES