futhark-0.25.15: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageGHC2021

Futhark.IR.Mem.Simplify

Synopsis

Documentation

simplifyProgGeneric :: SimplifyMemory rep inner => RuleBook (Wise rep) -> SimpleOps rep -> Prog rep -> PassM (Prog rep) Source #

simplifyStmsGeneric :: (HasScope rep m, MonadFreshNames m, SimplifyMemory rep inner) => RuleBook (Wise rep) -> SimpleOps rep -> Stms rep -> m (Stms rep) Source #

simpleGeneric :: SimplifyMemory rep inner => (inner (Wise rep) -> UsageTable) -> SimplifyOp rep (inner (Wise rep)) -> SimpleOps rep Source #

type SimplifyMemory rep inner = (SimplifiableRep rep, LetDec rep ~ LetDecMem, ExpDec rep ~ (), BodyDec rep ~ (), CanBeWise (OpC rep), BuilderOps (Wise rep), OpReturns inner, IndexOp (inner (Wise rep)), AliasedOp inner, Mem rep inner, CanBeWise inner, RephraseOp inner, ASTConstraints (inner (Wise rep))) Source #

Some constraints that must hold for the simplification rules to work.

memRuleBook :: SimplifyMemory rep inner => RuleBook (Wise rep) Source #

Standard collection of simplification rules for representations with memory.