do { markFactsUnchanged
; b <- foldM trace_block b blocks
; changed <- factsStatus
- ; facts <- allFacts
+ ; facts <- getAllFacts
; let depth = 0 -- was nesting depth
; ppIter depth n $
case changed of
in do { fuel <-
run "backward" (bc_name comp) (return ()) set_block_fact fuel blocks
; a <- getFact (G.lg_entry graph)
- ; facts <- allFacts
+ ; facts <- getAllFacts
; my_trace "Solution to graph after pass 1 is" (pprFacts graph facts a) $
return (fuel, a) }
solve_and_rewrite_b comp fuel graph exit_fact =
do { (_, a) <- solve_graph_b comp fuel graph exit_fact -- pass 1
- ; facts <- allFacts
+ ; facts <- getAllFacts
; (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
- ; facts <- allFacts
+ ; facts <- getAllFacts
; my_trace "Rewritten graph after pass 2 is" (pprFacts g facts) $
return (fuel, a, g) }
where
m f a -> m f a
subAnalysis' m =
do { a <- subAnalysis $
- do { a <- m; facts <- allFacts
+ do { a <- m; facts <- getAllFacts
; my_trace "after sub-analysis facts are" (pprFacts facts) $
return a }
- ; facts <- allFacts
+ ; facts <- getAllFacts
; 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)
-
-_unused :: FS.FastString
-_unused = undefined
-
null_b_ft = BComp "do nothing" Nothing no2 no2 no2
where no2 _ _ = Nothing