middle x _ = x
last _ (LastCall _ (Just id)) = LastOutFacts [(id, ProcPoint)]
last x l = LastOutFacts $ map (\id -> (id, x)) (succs l)
middle x _ = x
last _ (LastCall _ (Just id)) = LastOutFacts [(id, ProcPoint)]
last x l = LastOutFacts $ map (\id -> (id, x)) (succs l)
minimalProcPointSet :: CmmGraph -> ProcPointSet
minimalProcPointSet g = extendPPSet g (postorder_dfs g) entryPoint
minimalProcPointSet :: CmmGraph -> ProcPointSet
minimalProcPointSet g = extendPPSet g (postorder_dfs g) entryPoint
maybe_add_proto (Block id _) env | id == lg_entry g =
extendBlockEnv env id (Protocol stdArgConvention hinted_formals)
maybe_add_proto _ env = env
maybe_add_proto (Block id _) env | id == lg_entry g =
extendBlockEnv env id (Protocol stdArgConvention hinted_formals)
maybe_add_proto _ env = env
stdArgConvention = ConventionStandard CmmCallConv Arguments
-- | For now, following a suggestion by Ben Lippmeier, we pass all
stdArgConvention = ConventionStandard CmmCallConv Arguments
-- | For now, following a suggestion by Ben Lippmeier, we pass all
Nothing -> let live = lookupBlockEnv liveness id `orElse`
emptyRegSet -- XXX there's a bug lurking!
-- panic ("no liveness at block " ++ show id)
Nothing -> let live = lookupBlockEnv liveness id `orElse`
emptyRegSet -- XXX there's a bug lurking!
-- panic ("no liveness at block " ++ show id)
in extendBlockEnv protos id (Protocol ConventionPrivate formals)
g' = g { lg_blocks = add_CopyIns protos' (lg_blocks g) }
in extendBlockEnv protos id (Protocol ConventionPrivate formals)
g' = g { lg_blocks = add_CopyIns protos' (lg_blocks g) }