X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FZipDataflow0.hs;h=fb2919308f2cb544b36ce84d4b5645bcd2d8b5d1;hb=9f592bb0ae0dc76bd3ec7729474057d2069bb4db;hp=3a3b0a8b758742f88694d8d2c6476dd72927ec0e;hpb=fee569a69a4ce8c8d05b8a1fb8069d804dbd2b9c;p=ghc-hetmet.git diff --git a/compiler/cmm/ZipDataflow0.hs b/compiler/cmm/ZipDataflow0.hs index 3a3b0a8..fb29193 100644 --- a/compiler/cmm/ZipDataflow0.hs +++ b/compiler/cmm/ZipDataflow0.hs @@ -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 () @@ -299,7 +299,7 @@ run dir name set_entry do_block b blocks = 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 @@ -442,7 +442,7 @@ solve_graph_b comp fuel graph exit_fact = 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) } @@ -496,11 +496,11 @@ solve_and_rewrite_b_graph :: 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 @@ -1079,19 +1079,15 @@ subAnalysis' :: (Monad (m f), DataflowAnalysis m, Outputable f) => 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