Commit ac6edfae authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Remove more redundant Platform arguments

parent 5633b561
......@@ -62,15 +62,14 @@ import SMRep
pprCmms :: (Outputable info, Outputable g)
=> Platform -> [GenCmmGroup CmmStatics info g] -> SDoc
pprCmms _ cmms = pprCode CStyle (vcat (intersperse separator $ map ppr cmms))
=> [GenCmmGroup CmmStatics info g] -> SDoc
pprCmms cmms = pprCode CStyle (vcat (intersperse separator $ map ppr cmms))
where
separator = space $$ ptext (sLit "-------------------") $$ space
writeCmms :: (Outputable info, Outputable g)
=> DynFlags -> Handle -> [GenCmmGroup CmmStatics info g] -> IO ()
writeCmms dflags handle cmms = printForC dflags handle (pprCmms platform cmms)
where platform = targetPlatform dflags
writeCmms dflags handle cmms = printForC dflags handle (pprCmms cmms)
-----------------------------------------------------------------------------
......@@ -85,7 +84,7 @@ instance Outputable CmmStatic where
ppr x = sdocWithPlatform $ \platform -> pprStatic platform x
instance Outputable CmmInfoTable where
ppr x = sdocWithPlatform $ \platform -> pprInfoTable platform x
ppr = pprInfoTable
-----------------------------------------------------------------------------
......@@ -120,11 +119,10 @@ pprTop _ (CmmData section ds) =
-- --------------------------------------------------------------------------
-- Info tables.
pprInfoTable :: Platform -> CmmInfoTable -> SDoc
pprInfoTable _ CmmNonInfoTable
pprInfoTable :: CmmInfoTable -> SDoc
pprInfoTable CmmNonInfoTable
= empty
pprInfoTable _
(CmmInfoTable { cit_lbl = lbl, cit_rep = rep
pprInfoTable (CmmInfoTable { cit_lbl = lbl, cit_rep = rep
, cit_prof = prof_info
, cit_srt = _srt })
= vcat [ ptext (sLit "label:") <+> ppr lbl
......
......@@ -77,7 +77,7 @@ codeGen dflags this_mod data_tycons cost_centre_info stg_binds hpc_info = do
-- initialisation routines; see Note
-- [pipeline-split-init].
dumpIfSet_dyn dflags Opt_D_dump_cmm "Cmm" (pprCmms (targetPlatform dflags) code_stuff)
dumpIfSet_dyn dflags Opt_D_dump_cmm "Cmm" (pprCmms code_stuff)
return code_stuff
mkModuleInit
......
......@@ -1355,11 +1355,10 @@ tryNewCodeGen :: HscEnv -> Module -> [TyCon]
tryNewCodeGen hsc_env this_mod data_tycons
cost_centre_info stg_binds hpc_info = do
let dflags = hsc_dflags hsc_env
platform = targetPlatform dflags
prog <- StgCmm.codeGen dflags this_mod data_tycons
cost_centre_info stg_binds hpc_info
dumpIfSet_dyn dflags Opt_D_dump_cmmz "Cmm produced by new codegen"
(pprCmms platform prog)
(pprCmms prog)
-- We are building a single SRT for the entire module, so
-- we must thread it through all the procedures as we cps-convert them.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment