Commit 4717b03b authored by Ian Lynagh's avatar Ian Lynagh

Remove some more redundant Platform arguments

parent 0f1c5b1e
......@@ -75,7 +75,7 @@ writeCmms dflags handle cmms = printForC dflags handle (pprCmms cmms)
instance (Outputable d, Outputable info, Outputable i)
=> Outputable (GenCmmDecl d info i) where
ppr t = sdocWithPlatform $ \platform -> pprTop platform t
ppr t = pprTop t
instance Outputable CmmStatics where
ppr x = sdocWithPlatform $ \platform -> pprStatics platform x
......@@ -90,19 +90,19 @@ instance Outputable CmmInfoTable where
-----------------------------------------------------------------------------
pprCmmGroup :: (Outputable d, Outputable info, Outputable g)
=> Platform -> GenCmmGroup d info g -> SDoc
pprCmmGroup platform tops
= vcat $ intersperse blankLine $ map (pprTop platform) tops
=> GenCmmGroup d info g -> SDoc
pprCmmGroup tops
= vcat $ intersperse blankLine $ map pprTop tops
-- --------------------------------------------------------------------------
-- Top level `procedure' blocks.
--
pprTop :: (Outputable d, Outputable info, Outputable i)
=> Platform -> GenCmmDecl d info i -> SDoc
=> GenCmmDecl d info i -> SDoc
pprTop platform (CmmProc info lbl graph)
pprTop (CmmProc info lbl graph)
= vcat [ pprCLabel platform lbl <> lparen <> rparen
= vcat [ ppr lbl <> lparen <> rparen
, nest 8 $ lbrace <+> ppr info $$ rbrace
, nest 4 $ ppr graph
, rbrace ]
......@@ -112,7 +112,7 @@ pprTop platform (CmmProc info lbl graph)
--
-- section "data" { ... }
--
pprTop _ (CmmData section ds) =
pprTop (CmmData section ds) =
(hang (pprSection section <+> lbrace) 4 (ppr ds))
$$ rbrace
......
......@@ -134,7 +134,7 @@ cmmLlvmGen dflags us env cmm = do
fixStgRegisters cmm
dumpIfSet_dyn dflags Opt_D_dump_opt_cmm "Optimised Cmm"
(pprCmmGroup (targetPlatform dflags) [fixed_cmm])
(pprCmmGroup [fixed_cmm])
-- generate llvm code from cmm
let ((env', llvmBC), usGen) = {-# SCC "llvm_proc_gen" #-}
......
......@@ -360,7 +360,7 @@ cmmNativeGen dflags ncgImpl us cmm count
dumpIfSet_dyn dflags
Opt_D_dump_opt_cmm "Optimised Cmm"
(pprCmmGroup platform [opt_cmm])
(pprCmmGroup [opt_cmm])
-- generate native code from cmm
let ((native, lastMinuteImports), usGen) =
......
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