X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FZipDataflow.hs;h=ba8e75ac646fb775765fd88cefd0f46fb8b37656;hb=b06d623b2e367a572de5daf06d6a0b12c2740471;hp=39a4798ee49895c7041f717a8288bc0c494afe48;hpb=5dc8b425443200a5160b9d1399aca1808bfcffee;p=ghc-hetmet.git diff --git a/compiler/cmm/ZipDataflow.hs b/compiler/cmm/ZipDataflow.hs index 39a4798..ba8e75a 100644 --- a/compiler/cmm/ZipDataflow.hs +++ b/compiler/cmm/ZipDataflow.hs @@ -29,10 +29,8 @@ import qualified ZipCfg as G import Maybes import Outputable -import Panic import Control.Monad -import Maybe {- @@ -505,7 +503,7 @@ forward_sol check_maybe = forw forw rewrite name start_facts transfers rewrites = let anal_f :: DFM a b -> a -> Graph m l -> DFM a b anal_f finish in' g = - do { fwd_pure_anal name emptyBlockEnv transfers in' g; finish } + do { _ <- fwd_pure_anal name emptyBlockEnv transfers in' g; finish } solve :: DFM a b -> a -> Graph m l -> Fuel -> DFM a (b, Fuel) solve finish in_fact (Graph entry blockenv) fuel = @@ -572,7 +570,7 @@ mk_set_or_save :: (DataflowAnalysis df, Monad (df a), Outputable a) => (BlockId -> Bool) -> LastOutFacts a -> df a () mk_set_or_save is_local (LastOutFacts l) = mapM_ set_or_save_one l where set_or_save_one (id, a) = - if is_local id then setFact id a else pprTrace "addLastOutFact" (ppr $ length l) $ addLastOutFact (id, a) + if is_local id then setFact id a else addLastOutFact (id, a) @@ -609,7 +607,7 @@ forward_rew check_maybe = forw in_fact `seq` g `seq` let Graph entry blockenv = g blocks = G.postorder_dfs_from blockenv entry - in do { solve depth name start transfers rewrites in_fact g fuel + in do { _ <- solve depth name start transfers rewrites in_fact g fuel ; eid <- freshBlockId "temporary entry id" ; (rewritten, fuel) <- rew_tail (ZFirst eid) in_fact entry emptyBlockEnv fuel @@ -618,7 +616,7 @@ forward_rew check_maybe = forw ; return (a, lgraphToGraph (LGraph eid rewritten), fuel) } don't_rewrite facts finish in_fact g fuel = - do { solve depth name facts transfers rewrites in_fact g fuel + do { _ <- solve depth name facts transfers rewrites in_fact g fuel ; a <- finish ; return (a, g, fuel) } @@ -684,8 +682,8 @@ forward_rew check_maybe = forw either_last rewrites in' (LastOther l) = fr_last rewrites l in' check_facts in' (LastOther l) = let LastOutFacts last_outs = ft_last_outs transfers l in' - in mapM (uncurry checkFactMatch) last_outs - check_facts _ LastExit = return [] + in mapM_ (uncurry checkFactMatch) last_outs + check_facts _ LastExit = return () in fixed_pt_and_fuel lastOutFacts :: DFM f (LastOutFacts f) @@ -781,7 +779,7 @@ backward_sol check_maybe = back my_trace "analysis rewrites last node" (ppr l <+> pprGraph g') $ subsolve g exit_fact fuel - ; set_head_fact h a fuel + ; _ <- set_head_fact h a fuel ; return fuel } in do { fuel <- run "backward" name set_block_fact blocks fuel @@ -982,7 +980,7 @@ instance FixedPoint ForwardFixedPoint where dump_things :: Bool -dump_things = True +dump_things = False my_trace :: String -> SDoc -> a -> a my_trace = if dump_things then pprTrace else \_ _ a -> a