Commit 5a7a3110 authored by Isaac Dupree's avatar Isaac Dupree

move and generalize another instance (#1405)

was instance Outputable CmmGraph
type CmmGraph = LGraph Middle Last
now instance (ctx) => Outputable (LGraph m l),
in module with LGraph where it belongs
This also let us reduce the context of DebugNodes to Haskell98,
leaving that class's only extension being multi-parameter.
(also Outputable (LGraph M Last) with M = ExtendWithSpills Middle
was another redundant instance that was then removed)
parent c886dd30
......@@ -360,9 +360,6 @@ instance Outputable m => Outputable (ExtendWithSpills m) where
ppr (Reload regs) = ppr_regs "Reload" regs
ppr (NotSpillOrReload m) = ppr m
instance Outputable (LGraph M Last) where
ppr = pprLgraph
instance DebugNodes M Last
ppr_regs :: String -> RegSet -> SDoc
......
......@@ -688,6 +688,9 @@ mkBlockSet = mkUniqSet
instance (Outputable m, Outputable l) => Outputable (ZTail m l) where
ppr = pprTail
instance (Outputable m, Outputable l, LastNode l) => Outputable (LGraph m l) where
ppr = pprLgraph
pprTail :: (Outputable m, Outputable l) => ZTail m l -> SDoc
pprTail (ZTail m t) = ppr m $$ ppr t
pprTail (ZLast LastExit) = text "<exit>"
......
......@@ -197,9 +197,6 @@ instance Outputable Convention where
instance DF.DebugNodes Middle Last
instance Outputable CmmGraph where
ppr = pprLgraph
debugPpr :: Bool
debugPpr = debugIsOn
......
......@@ -244,7 +244,7 @@ fold_edge_facts_with_nodes_b :: LastNode l
-- fixed point iteratively starting from somewhere other than bottom
-- (as in the reachability analysis done for proc points).
class (Outputable m, Outputable l, LastNode l, Outputable (LGraph m l)) => DebugNodes m l
class (Outputable m, Outputable l, LastNode l) => DebugNodes m l
refine_f_anal :: (DebugNodes m l, LastNode l, Outputable a) =>
FAnalysis m l a -> LGraph m l -> DFA a () -> DFA a ()
......
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