-- fixed point iteratively starting from somewhere other than bottom
-- (as in the reachability analysis done for proc points).
-- 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 ()
refine_f_anal :: (DebugNodes m l, LastNode l, Outputable a) =>
FAnalysis m l a -> LGraph m l -> DFA a () -> DFA a ()
in do { fuel <-
run "backward" (bc_name comp) (return ()) set_block_fact fuel blocks
; a <- getFact (G.lg_entry graph)
in do { fuel <-
run "backward" (bc_name comp) (return ()) set_block_fact fuel blocks
; a <- getFact (G.lg_entry graph)
solve_and_rewrite_b comp fuel graph exit_fact =
do { (_, a) <- solve_graph_b comp fuel graph exit_fact -- pass 1
solve_and_rewrite_b comp fuel graph exit_fact =
do { (_, a) <- solve_graph_b comp fuel graph exit_fact -- pass 1
; (fuel, g) <- -- pass 2
my_trace "Solution to graph after pass 1 is" (pprFacts graph facts) $
backward_rewrite (comp_with_exit_b comp exit_fact) fuel graph
; (fuel, g) <- -- pass 2
my_trace "Solution to graph after pass 1 is" (pprFacts graph facts) $
backward_rewrite (comp_with_exit_b comp exit_fact) fuel graph
; my_trace "in parent analysis facts are" (pprFacts facts) $
return a }
where pprFacts env = nest 2 $ vcat $ map pprFact $ ufmToList env
pprFact (id, a) = hang (ppr id <> colon) 4 (ppr a)
; my_trace "in parent analysis facts are" (pprFacts facts) $
return a }
where pprFacts env = nest 2 $ vcat $ map pprFact $ ufmToList env
pprFact (id, a) = hang (ppr id <> colon) 4 (ppr a)