futhark-0.21.1: An optimising compiler for a functional, array-oriented language.
Safe HaskellNone
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 rep = VName -> Maybe (Exp rep, Certs) Source #

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

applySimpleRules :: VarLookup rep -> TypeLookup -> BasicOp -> Maybe (BasicOp, Certs) Source #

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