futhark-0.20.2: An optimising compiler for a functional, array-oriented language.
Safe HaskellNone
LanguageHaskell2010

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

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 (SymbolTable (Wise rep), 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.