Safe Haskell | None |
---|---|
Language | Haskell2010 |
A representation where all bindings are annotated with aliasing information.
Synopsis
- data Aliases lore
- newtype Names' = Names' {}
- type VarAliases = Names'
- type ConsumedInExp = Names'
- type BodyAliasing = ([VarAliases], ConsumedInExp)
- module Futhark.Representation.AST.Attributes.Aliases
- module Futhark.Representation.AST.Attributes
- module Futhark.Representation.AST.Traversals
- module Futhark.Representation.AST.Pretty
- module Futhark.Representation.AST.Syntax
- addAliasesToPattern :: (Attributes lore, CanBeAliased (Op lore), Typed attr) => PatternT attr -> Exp (Aliases lore) -> PatternT (VarAliases, attr)
- mkAliasedLetStm :: (Attributes lore, CanBeAliased (Op lore)) => Pattern lore -> StmAux (ExpAttr lore) -> Exp (Aliases lore) -> Stm (Aliases lore)
- mkAliasedBody :: (Attributes lore, CanBeAliased (Op lore)) => BodyAttr lore -> Stms (Aliases lore) -> Result -> Body (Aliases lore)
- mkPatternAliases :: (Attributes lore, Aliased lore, Typed attr) => PatternT attr -> Exp lore -> ([PatElemT (VarAliases, attr)], [PatElemT (VarAliases, attr)])
- mkBodyAliases :: Aliased lore => Stms lore -> Result -> BodyAliasing
- removeProgAliases :: CanBeAliased (Op lore) => Prog (Aliases lore) -> Prog lore
- removeFunDefAliases :: CanBeAliased (Op lore) => FunDef (Aliases lore) -> FunDef lore
- removeExpAliases :: CanBeAliased (Op lore) => Exp (Aliases lore) -> Exp lore
- removeBodyAliases :: CanBeAliased (Op lore) => Body (Aliases lore) -> Body lore
- removeStmAliases :: CanBeAliased (Op lore) => Stm (Aliases lore) -> Stm lore
- removeLambdaAliases :: CanBeAliased (Op lore) => Lambda (Aliases lore) -> Lambda lore
- removePatternAliases :: PatternT (Names', a) -> PatternT a
- removeScopeAliases :: Scope (Aliases lore) -> Scope lore
- type AliasesAndConsumed = (Map VName Names, Names)
- trackAliases :: Aliased lore => AliasesAndConsumed -> Stm lore -> AliasesAndConsumed
- consumedInStms :: Aliased lore => Stms lore -> [SubExp] -> Names
The Lore definition
The lore for the basic representation.
Instances
A wrapper around Names
to get around the fact that we need an
Ord
instance, which Names
does not have.
Instances
Eq Names' Source # | |
Ord Names' Source # | |
Show Names' Source # | |
Semigroup Names' Source # | |
Monoid Names' Source # | |
Pretty Names' Source # | |
FreeAttr Names' Source # | |
Defined in Futhark.Representation.Aliases | |
FreeIn Names' Source # | |
Substitute Names' Source # | |
Defined in Futhark.Representation.Aliases | |
Rename Names' Source # | |
PrettyAnnot (PatElemT attr) => PrettyAnnot (PatElemT (VarAliases, attr)) Source # | |
Defined in Futhark.Representation.Aliases | |
AliasesOf (VarAliases, attr) Source # | |
Defined in Futhark.Representation.Aliases aliasesOf :: (VarAliases, attr) -> Names Source # |
type VarAliases = Names' Source #
The aliases of the let-bound variable.
type ConsumedInExp = Names' Source #
Everything consumed in the expression.
type BodyAliasing = ([VarAliases], ConsumedInExp) Source #
The aliases of what is returned by the BodyT
, and what is
consumed inside of it.
Module re-exports
Adding aliases
addAliasesToPattern :: (Attributes lore, CanBeAliased (Op lore), Typed attr) => PatternT attr -> Exp (Aliases lore) -> PatternT (VarAliases, attr) Source #
mkAliasedLetStm :: (Attributes lore, CanBeAliased (Op lore)) => Pattern lore -> StmAux (ExpAttr lore) -> Exp (Aliases lore) -> Stm (Aliases lore) Source #
mkAliasedBody :: (Attributes lore, CanBeAliased (Op lore)) => BodyAttr lore -> Stms (Aliases lore) -> Result -> Body (Aliases lore) Source #
mkPatternAliases :: (Attributes lore, Aliased lore, Typed attr) => PatternT attr -> Exp lore -> ([PatElemT (VarAliases, attr)], [PatElemT (VarAliases, attr)]) Source #
mkBodyAliases :: Aliased lore => Stms lore -> Result -> BodyAliasing Source #
Removing aliases
removeProgAliases :: CanBeAliased (Op lore) => Prog (Aliases lore) -> Prog lore Source #
removeFunDefAliases :: CanBeAliased (Op lore) => FunDef (Aliases lore) -> FunDef lore Source #
removeExpAliases :: CanBeAliased (Op lore) => Exp (Aliases lore) -> Exp lore Source #
removeBodyAliases :: CanBeAliased (Op lore) => Body (Aliases lore) -> Body lore Source #
removeStmAliases :: CanBeAliased (Op lore) => Stm (Aliases lore) -> Stm lore Source #
removeLambdaAliases :: CanBeAliased (Op lore) => Lambda (Aliases lore) -> Lambda lore Source #
Tracking aliases
trackAliases :: Aliased lore => AliasesAndConsumed -> Stm lore -> AliasesAndConsumed Source #