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

Futhark.Analysis.Alias

Description

Alias analysis of a full Futhark program. Takes as input a program with an arbitrary rep and produces one with aliases. This module does not implement the aliasing logic itself, and derives its information from definitions in Futhark.IR.Prop.Aliases and Futhark.IR.Aliases. The alias information computed here will include transitive aliases (note that this is not what the building blocks do).

Synopsis

Documentation

aliasAnalysis :: AliasableRep rep => Prog rep -> Prog (Aliases rep) Source #

Perform alias analysis on a Futhark program.

type AliasableRep rep = (ASTRep rep, RephraseOp (OpC rep), CanBeAliased (OpC rep), AliasedOp (OpC rep), ASTConstraints (OpC rep (Aliases rep))) Source #

What we require of an aliasable representation.

Ad-hoc utilities

analyseFun :: AliasableRep rep => FunDef rep -> FunDef (Aliases rep) Source #

Perform alias analysis on function.

analyseStms :: AliasableRep rep => AliasTable -> Stms rep -> (Stms (Aliases rep), AliasesAndConsumed) Source #

Perform alias analysis on statements.

analyseStm :: AliasableRep rep => AliasTable -> Stm rep -> Stm (Aliases rep) Source #

Perform alias analysis on statement.

analyseExp :: AliasableRep rep => AliasTable -> Exp rep -> Exp (Aliases rep) Source #

Perform alias analysis on expression.

analyseBody :: AliasableRep rep => AliasTable -> Body rep -> Body (Aliases rep) Source #

Perform alias analysis on Body.

analyseLambda :: AliasableRep rep => AliasTable -> Lambda rep -> Lambda (Aliases rep) Source #

Perform alias analysis on lambda.