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

Safe Haskell | Safe-Inferred
Language | GHC2021

Futhark.IR.Mem.Simplify

Synopsis

- simplifyProgGeneric :: SimplifyMemory rep inner => RuleBook (Wise rep) -> SimpleOps rep -> Prog rep -> PassM (Prog rep)
- simplifyStmsGeneric :: (HasScope rep m, MonadFreshNames m, SimplifyMemory rep inner) => RuleBook (Wise rep) -> SimpleOps rep -> Stms rep -> m (Stms rep)
- simpleGeneric :: SimplifyMemory rep inner => (inner (Wise rep) -> UsageTable) -> SimplifyOp rep (inner (Wise rep)) -> SimpleOps rep
- 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)))
- memRuleBook :: SimplifyMemory rep inner => RuleBook (Wise rep)

# 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.