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

Futhark.IR.Aliases

Description

A representation where all bindings are annotated with aliasing information.

Synopsis

The Lore definition

data Aliases lore Source #

The lore for the basic representation.

Instances

Instances details
(Decorations lore, CanBeAliased (Op lore)) => Decorations (Aliases lore) Source # 
Instance details

Defined in Futhark.IR.Aliases

Associated Types

type LetDec (Aliases lore) Source #

type ExpDec (Aliases lore) Source #

type BodyDec (Aliases lore) Source #

type FParamInfo (Aliases lore) Source #

type LParamInfo (Aliases lore) Source #

type RetType (Aliases lore) Source #

type BranchType (Aliases lore) Source #

type Op (Aliases lore) Source #

(ASTLore lore, CanBeAliased (Op lore)) => PrettyLore (Aliases lore) Source # 
Instance details

Defined in Futhark.IR.Aliases

Methods

ppExpLore :: ExpDec (Aliases lore) -> Exp (Aliases lore) -> Maybe Doc Source #

(ASTLore lore, CanBeAliased (Op lore)) => ASTLore (Aliases lore) Source # 
Instance details

Defined in Futhark.IR.Aliases

Methods

expTypesFromPattern :: (HasScope (Aliases lore) m, Monad m) => Pattern (Aliases lore) -> m [BranchType (Aliases lore)] Source #

(ASTLore lore, CanBeAliased (Op lore)) => Aliased (Aliases lore) Source # 
Instance details

Defined in Futhark.IR.Aliases

(Bindable lore, CanBeAliased (Op lore)) => Bindable (Aliases lore) Source # 
Instance details

Defined in Futhark.IR.Aliases

Methods

mkExpPat :: [Ident] -> [Ident] -> Exp (Aliases lore) -> Pattern (Aliases lore) Source #

mkExpDec :: Pattern (Aliases lore) -> Exp (Aliases lore) -> ExpDec (Aliases lore) Source #

mkBody :: Stms (Aliases lore) -> Result -> Body (Aliases lore) Source #

mkLetNames :: (MonadFreshNames m, HasScope (Aliases lore) m) => [VName] -> Exp (Aliases lore) -> m (Stm (Aliases lore)) Source #

(ASTLore (Aliases lore), Bindable (Aliases lore)) => BinderOps (Aliases lore) Source # 
Instance details

Defined in Futhark.IR.Aliases

Methods

mkExpDecB :: (MonadBinder m, Lore m ~ Aliases lore) => Pattern (Aliases lore) -> Exp (Aliases lore) -> m (ExpDec (Aliases lore)) Source #

mkBodyB :: (MonadBinder m, Lore m ~ Aliases lore) => Stms (Aliases lore) -> Result -> m (Body (Aliases lore)) Source #

mkLetNamesB :: (MonadBinder m, Lore m ~ Aliases lore) => [VName] -> Exp (Aliases lore) -> m (Stm (Aliases lore)) Source #

(ASTLore lore, CanBeAliased (Op lore), CSEInOp (OpWithAliases (Op lore))) => CSEInOp (SOAC (Aliases lore)) Source # 
Instance details

Defined in Futhark.Optimise.CSE

Methods

cseInOp :: SOAC (Aliases lore) -> CSEM lore0 (SOAC (Aliases lore))

Checkable lore => HasScope (Aliases lore) (TypeM lore) Source # 
Instance details

Defined in Futhark.TypeCheck

Methods

lookupType :: VName -> TypeM lore Type Source #

lookupInfo :: VName -> TypeM lore (NameInfo (Aliases lore)) Source #

askScope :: TypeM lore (Scope (Aliases lore)) Source #

asksScope :: (Scope (Aliases lore) -> a) -> TypeM lore a Source #

type LetDec (Aliases lore) Source # 
Instance details

Defined in Futhark.IR.Aliases

type LetDec (Aliases lore) = (VarAliases, LetDec lore)
type ExpDec (Aliases lore) Source # 
Instance details

Defined in Futhark.IR.Aliases

type ExpDec (Aliases lore) = (ConsumedInExp, ExpDec lore)
type BodyDec (Aliases lore) Source # 
Instance details

Defined in Futhark.IR.Aliases

type BodyDec (Aliases lore) = (BodyAliasing, BodyDec lore)
type FParamInfo (Aliases lore) Source # 
Instance details

Defined in Futhark.IR.Aliases

type FParamInfo (Aliases lore) = FParamInfo lore
type LParamInfo (Aliases lore) Source # 
Instance details

Defined in Futhark.IR.Aliases

type LParamInfo (Aliases lore) = LParamInfo lore
type RetType (Aliases lore) Source # 
Instance details

Defined in Futhark.IR.Aliases

type RetType (Aliases lore) = RetType lore
type BranchType (Aliases lore) Source # 
Instance details

Defined in Futhark.IR.Aliases

type BranchType (Aliases lore) = BranchType lore
type Op (Aliases lore) Source # 
Instance details

Defined in Futhark.IR.Aliases

type Op (Aliases lore) = OpWithAliases (Op lore)

newtype AliasDec Source #

A wrapper around AliasDec to get around the fact that we need an Ord instance, which 'AliasDec does not have.

Constructors

AliasDec 

Fields

Instances

Instances details
Eq AliasDec Source # 
Instance details

Defined in Futhark.IR.Aliases

Ord AliasDec Source # 
Instance details

Defined in Futhark.IR.Aliases

Show AliasDec Source # 
Instance details

Defined in Futhark.IR.Aliases

Semigroup AliasDec Source # 
Instance details

Defined in Futhark.IR.Aliases

Monoid AliasDec Source # 
Instance details

Defined in Futhark.IR.Aliases

Pretty AliasDec Source # 
Instance details

Defined in Futhark.IR.Aliases

Methods

ppr :: AliasDec -> Doc #

pprPrec :: Int -> AliasDec -> Doc #

pprList :: [AliasDec] -> Doc #

FreeDec AliasDec Source # 
Instance details

Defined in Futhark.IR.Aliases

Methods

precomputed :: AliasDec -> FV -> FV Source #

FreeIn AliasDec Source # 
Instance details

Defined in Futhark.IR.Aliases

Methods

freeIn' :: AliasDec -> FV Source #

Substitute AliasDec Source # 
Instance details

Defined in Futhark.IR.Aliases

Rename AliasDec Source # 
Instance details

Defined in Futhark.IR.Aliases

AliasesOf (VarAliases, dec) Source # 
Instance details

Defined in Futhark.IR.Aliases

Methods

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 re-exports

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 #

Removing aliases

removeExpAliases :: CanBeAliased (Op lore) => Exp (Aliases lore) -> Exp lore Source #

removeStmAliases :: CanBeAliased (Op lore) => Stm (Aliases lore) -> Stm lore Source #

Tracking aliases

mkStmsAliases :: Aliased lore => Stms lore -> [SubExp] -> ([Names], Names) Source #

The aliases of the result and everything consumed in the given statements.