Safe Haskell | None |
---|---|
Language | Haskell2010 |
Alias analysis of a full Futhark program. Takes as input a program with an arbitrary lore and produces one with aliases. This module does not implement the aliasing logic itself, and derives its information from definitions in Futhark.Representation.AST.Attributes.Aliases and Futhark.Representation.Aliases. The alias information computed here will include transitive aliases (note that this is not what the building blocks do).
Synopsis
- aliasAnalysis :: (Attributes lore, CanBeAliased (Op lore)) => Prog lore -> Prog (Aliases lore)
- type AliasTable = Map VName Names
- analyseFun :: (Attributes lore, CanBeAliased (Op lore)) => FunDef lore -> FunDef (Aliases lore)
- analyseStms :: (Attributes lore, CanBeAliased (Op lore)) => AliasTable -> Stms lore -> (Stms (Aliases lore), AliasesAndConsumed)
- analyseExp :: (Attributes lore, CanBeAliased (Op lore)) => AliasTable -> Exp lore -> Exp (Aliases lore)
- analyseBody :: (Attributes lore, CanBeAliased (Op lore)) => AliasTable -> Body lore -> Body (Aliases lore)
- analyseLambda :: (Attributes lore, CanBeAliased (Op lore)) => Lambda lore -> Lambda (Aliases lore)
Documentation
aliasAnalysis :: (Attributes lore, CanBeAliased (Op lore)) => Prog lore -> Prog (Aliases lore) Source #
Perform alias analysis on a Futhark program.
Ad-hoc utilities
type AliasTable = Map VName Names Source #
Pre-existing aliases for variables. Used to add transitive aliases.
analyseFun :: (Attributes lore, CanBeAliased (Op lore)) => FunDef lore -> FunDef (Aliases lore) Source #
analyseStms :: (Attributes lore, CanBeAliased (Op lore)) => AliasTable -> Stms lore -> (Stms (Aliases lore), AliasesAndConsumed) Source #
analyseExp :: (Attributes lore, CanBeAliased (Op lore)) => AliasTable -> Exp lore -> Exp (Aliases lore) Source #
analyseBody :: (Attributes lore, CanBeAliased (Op lore)) => AliasTable -> Body lore -> Body (Aliases lore) Source #
analyseLambda :: (Attributes lore, CanBeAliased (Op lore)) => Lambda lore -> Lambda (Aliases lore) Source #