import UniqSet
import ZipCfg
import ZipCfgCmmRep
-import ZipDataflow
+import ZipDataflow0
-- Compute a minimal set of proc points for a control-flow graph.
middle x _ = x
last _ (LastCall _ (Just id)) = LastOutFacts [(id, ProcPoint)]
last x l = LastOutFacts $ map (\id -> (id, x)) (succs l)
- exit _ = LastOutFacts []
+ exit x = x
minimalProcPointSet :: CmmGraph -> ProcPointSet
minimalProcPointSet g = extendPPSet g (postorder_dfs g) entryPoint
let (Block _ t) = lookupBlockEnv (lg_blocks g) id `orElse`
panic "jump out of graph"
in case t of
- ZTail (CopyIn {}) (ZLast (LastOther (LastBranch pee [])))
+ ZTail (CopyIn {}) (ZLast (LastOther (LastBranch pee)))
| elemBlockSet pee procPoints -> Just pee
_ -> Nothing
init_protocols = fold_blocks maybe_add_proto emptyBlockEnv g