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

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.