{-# OPTIONS_GHC -XNoMonoLocalBinds #-}
-- Norman likes local bindings
-- If this module lives on I'd like to get rid of this flag in due course
+
module CmmCPS (
-- | Converts C-- with full proceedures and parameters
-- to a CPS transformed C-- with the stack made manifest.
(dualLivenessWithInsertion procPoints) g
-- Insert spills at defns; reloads at return points
g <-
- -- pprTrace "pre insertLateReloads" (ppr g) $
- runOptimization $ insertLateReloads g -- Duplicate reloads just before uses
- dump Opt_D_dump_cmmz "Post late reloads" g
+ runOptimization $ rewriteAssignments g
+ dump Opt_D_dump_cmmz "Post rewrite assignments" g
g <-
-- pprTrace "post insertLateReloads" (ppr g) $
dual_rewrite runOptimization Opt_D_dump_cmmz "Dead Assignment Elimination"