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

Futhark.Analysis.Range

Description

Perform range analysis of a program or other fragment.

Synopsis

Documentation

rangeAnalysis :: (ASTLore lore, CanBeRanged (Op lore)) => Prog lore -> Prog (Ranges lore) Source #

Perform variable range analysis on the given program, returning a program with embedded range annotations.

runRangeM :: RangeM a -> a Source #

Run a RangeM action.

type RangeM = Reader RangeEnv Source #

The range analysis monad.

analyseLambda :: (ASTLore lore, CanBeRanged (Op lore)) => Lambda lore -> RangeM (Lambda (Ranges lore)) Source #

Perform range analysis on a lambda.

analyseStms :: (ASTLore lore, CanBeRanged (Op lore)) => Stms lore -> (Stms (Ranges lore) -> RangeM a) -> RangeM a Source #

Perform range analysis on some statements, taking a continuation where the ranges of the variables bound by the statements is in scope.