Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
A representation where all bindings are annotated with aliasing information.
Synopsis
- data Aliases lore
- newtype AliasDec = AliasDec {}
- type VarAliases = AliasDec
- type ConsumedInExp = AliasDec
- type BodyAliasing = ([VarAliases], ConsumedInExp)
- module Futhark.IR.Prop.Aliases
- module Futhark.IR.Prop
- module Futhark.IR.Traversals
- module Futhark.IR.Pretty
- module Futhark.IR.Syntax
- addAliasesToPattern :: (ASTLore lore, CanBeAliased (Op lore), Typed dec) => PatternT dec -> Exp (Aliases lore) -> PatternT (VarAliases, dec)
- mkAliasedLetStm :: (ASTLore lore, CanBeAliased (Op lore)) => Pattern lore -> StmAux (ExpDec lore) -> Exp (Aliases lore) -> Stm (Aliases lore)
- mkAliasedBody :: (ASTLore lore, CanBeAliased (Op lore)) => BodyDec lore -> Stms (Aliases lore) -> Result -> Body (Aliases lore)
- mkPatternAliases :: (Aliased lore, Typed dec) => PatternT dec -> Exp lore -> ([PatElemT (VarAliases, dec)], [PatElemT (VarAliases, dec)])
- 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
- removeStmAliases :: CanBeAliased (Op lore) => Stm (Aliases lore) -> Stm lore
- removeLambdaAliases :: CanBeAliased (Op lore) => Lambda (Aliases lore) -> Lambda lore
- removePatternAliases :: PatternT (AliasDec, a) -> PatternT a
- removeScopeAliases :: Scope (Aliases lore) -> Scope lore
- type AliasesAndConsumed = (Map VName Names, Names)
- trackAliases :: Aliased lore => AliasesAndConsumed -> Stm lore -> AliasesAndConsumed
- mkStmsAliases :: Aliased lore => Stms lore -> [SubExp] -> ([Names], Names)
The Lore definition
The lore for the basic representation.
Instances
A wrapper around AliasDec
to get around the fact that we need an
Ord
instance, which 'AliasDec does not have.
Instances
Eq AliasDec Source # | |
Ord AliasDec Source # | |
Defined in Futhark.IR.Aliases | |
Show AliasDec Source # | |
Semigroup AliasDec Source # | |
Monoid AliasDec Source # | |
Pretty AliasDec Source # | |
FreeDec AliasDec Source # | |
Defined in Futhark.IR.Aliases | |
FreeIn AliasDec Source # | |
Substitute AliasDec Source # | |
Defined in Futhark.IR.Aliases | |
Rename AliasDec Source # | |
AliasesOf (VarAliases, dec) Source # | |
Defined in Futhark.IR.Aliases aliasesOf :: (VarAliases, dec) -> Names Source # |
type VarAliases = AliasDec Source #
The aliases of the let-bound variable.
type ConsumedInExp = AliasDec Source #
Everything consumed in the expression.
type BodyAliasing = ([VarAliases], ConsumedInExp) Source #
The aliases of what is returned by the Body
, and what is
consumed inside of it.
module Futhark.IR.Prop.Aliases
Module re-exports
module Futhark.IR.Prop
module Futhark.IR.Traversals
module Futhark.IR.Pretty
module Futhark.IR.Syntax
Adding aliases
addAliasesToPattern :: (ASTLore lore, CanBeAliased (Op lore), Typed dec) => PatternT dec -> Exp (Aliases lore) -> PatternT (VarAliases, dec) Source #
mkAliasedLetStm :: (ASTLore lore, CanBeAliased (Op lore)) => Pattern lore -> StmAux (ExpDec lore) -> Exp (Aliases lore) -> Stm (Aliases lore) Source #
mkAliasedBody :: (ASTLore lore, CanBeAliased (Op lore)) => BodyDec lore -> Stms (Aliases lore) -> Result -> Body (Aliases lore) Source #
mkPatternAliases :: (Aliased lore, Typed dec) => PatternT dec -> Exp lore -> ([PatElemT (VarAliases, dec)], [PatElemT (VarAliases, dec)]) 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 #
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 #