futhark-0.25.32: An optimising compiler for a functional, array-oriented language.

Safe Haskell | None
Language | GHC2021

Futhark.Transform.CopyPropagate

Description

Perform copy propagation. This is done by invoking the simplifier with no rules, so hoisting and dead-code elimination may also take place.

Synopsis

- copyPropagateInProg :: SimplifiableRep rep => SimpleOps rep -> Prog rep -> PassM (Prog rep)
- copyPropagateInStms :: (MonadFreshNames m, SimplifiableRep rep) => SimpleOps rep -> Scope rep -> Stms rep -> m (Stms rep)
- copyPropagateInFun :: (MonadFreshNames m, SimplifiableRep rep) => SimpleOps rep -> SymbolTable (Wise rep) -> FunDef rep -> m (FunDef rep)

# Documentation

copyPropagateInProg :: SimplifiableRep rep => SimpleOps rep -> Prog rep -> PassM (Prog rep) Source #

Run copy propagation on an entire program.

copyPropagateInStms :: (MonadFreshNames m, SimplifiableRep rep) => SimpleOps rep -> Scope rep -> Stms rep -> m (Stms rep) Source #

Run copy propagation on some statements.

copyPropagateInFun :: (MonadFreshNames m, SimplifiableRep rep) => SimpleOps rep -> SymbolTable (Wise rep) -> FunDef rep -> m (FunDef rep) Source #

Run copy propagation on a function.