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

Futhark.Optimise.Simplify.Rules.Simple

Description

Particularly simple simplification rules.

Synopsis

Documentation

type TypeLookup = SubExp -> Maybe Type Source #

A function that, given a subexpression, returns its type.

type VarLookup lore = VName -> Maybe (Exp lore, Certificates) Source #

A function that, given a variable name, returns its definition.

applySimpleRules :: VarLookup lore -> TypeLookup -> BasicOp -> Maybe (BasicOp, Certificates) Source #

Try to simplify the given BasicOp, returning a new BasicOp and certificates that it must depend on.