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

Futhark.IR.Rep

Description

The core Futhark AST is parameterised by a rep type parameter, which is then used to invoke the type families defined here.

Synopsis

Documentation

class (Show (LetDec l), Show (ExpDec l), Show (BodyDec l), Show (FParamInfo l), Show (LParamInfo l), Show (RetType l), Show (BranchType l), Show (Op l), Eq (LetDec l), Eq (ExpDec l), Eq (BodyDec l), Eq (FParamInfo l), Eq (LParamInfo l), Eq (RetType l), Eq (BranchType l), Eq (Op l), Ord (LetDec l), Ord (ExpDec l), Ord (BodyDec l), Ord (FParamInfo l), Ord (LParamInfo l), Ord (RetType l), Ord (BranchType l), Ord (Op l), IsRetType (RetType l), IsBodyType (BranchType l), Typed (FParamInfo l), Typed (LParamInfo l), Typed (LetDec l), DeclTyped (FParamInfo l)) => RepTypes l Source #

A collection of type families giving various common types for a representation, along with constraints specifying that the types they map to should satisfy some minimal requirements.

Associated Types

type LetDec l :: Type Source #

Decoration for every let-pattern element.

type LetDec l = Type

type ExpDec l :: Type Source #

Decoration for every expression.

type ExpDec l = ()

type BodyDec l :: Type Source #

Decoration for every body.

type BodyDec l = ()

type FParamInfo l :: Type Source #

Decoration for every (non-lambda) function parameter.

type LParamInfo l :: Type Source #

Decoration for every lambda function parameter.

type LParamInfo l = Type

type RetType l :: Type Source #

The return type decoration of function calls.

type BranchType l :: Type Source #

The return type decoration of branches.

type OpC l :: Type -> Type Source #

Type constructor for the extensible operation. The somewhat funky definition is to ensure that we can change the "inner" representation in a generic way (e.g. add aliasing information) In most code, you will use the Op alias instead.

type OpC l = NoOp

Instances

Instances details
RepTypes GPU Source # 
Instance details

Defined in Futhark.IR.GPU

RepTypes GPUMem Source # 
Instance details

Defined in Futhark.IR.GPUMem

RepTypes MC Source # 
Instance details

Defined in Futhark.IR.MC

RepTypes MCMem Source # 
Instance details

Defined in Futhark.IR.MCMem

RepTypes SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

RepTypes Seq Source # 
Instance details

Defined in Futhark.IR.Seq

RepTypes SeqMem Source # 
Instance details

Defined in Futhark.IR.SeqMem

(RepTypes rep, ASTConstraints (OpC rep (Aliases rep))) => RepTypes (Aliases rep) Source # 
Instance details

Defined in Futhark.IR.Aliases

Associated Types

type LetDec (Aliases rep) Source #

type ExpDec (Aliases rep) Source #

type BodyDec (Aliases rep) Source #

type FParamInfo (Aliases rep) Source #

type LParamInfo (Aliases rep) Source #

type RetType (Aliases rep) Source #

type BranchType (Aliases rep) Source #

type OpC (Aliases rep) :: Type -> Type Source #

(Informing rep, Ord (OpC rep (Wise rep)), Eq (OpC rep (Wise rep)), Show (OpC rep (Wise rep)), IsOp (OpC rep (Wise rep)), Pretty (OpC rep (Wise rep))) => RepTypes (Wise rep) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

Associated Types

type LetDec (Wise rep) Source #

type ExpDec (Wise rep) Source #

type BodyDec (Wise rep) Source #

type FParamInfo (Wise rep) Source #

type LParamInfo (Wise rep) Source #

type RetType (Wise rep) Source #

type BranchType (Wise rep) Source #

type OpC (Wise rep) :: Type -> Type Source #

type Op l = OpC l l Source #

Apply the OpC constructor of a representation to that representation.

data NoOp rep Source #

Returns nothing and does nothing. Placeholder for when we don't really want an operation.

Constructors

NoOp 

Instances

Instances details
CanBeAliased (NoOp :: Type -> Type) Source # 
Instance details

Defined in Futhark.IR.Aliases

Methods

addOpAliases :: AliasableRep rep => AliasTable -> NoOp rep -> NoOp (Aliases rep) Source #

RephraseOp (NoOp :: Type -> Type) Source # 
Instance details

Defined in Futhark.IR.Rephrase

Methods

rephraseInOp :: Monad m => Rephraser m from to -> NoOp from -> m (NoOp to) Source #

CanBeWise (NoOp :: Type -> Type) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

Methods

addOpWisdom :: Informing rep => NoOp rep -> NoOp (Wise rep) Source #

Show (NoOp rep) Source # 
Instance details

Defined in Futhark.IR.Rep

Methods

showsPrec :: Int -> NoOp rep -> ShowS #

show :: NoOp rep -> String #

showList :: [NoOp rep] -> ShowS #

OpMetrics (NoOp rep) Source # 
Instance details

Defined in Futhark.Analysis.Metrics

Methods

opMetrics :: NoOp rep -> MetricsM () Source #

IndexOp (NoOp rep) Source # 
Instance details

Defined in Futhark.Analysis.SymbolTable

Methods

indexOp :: (ASTRep rep0, IndexOp (Op rep0)) => SymbolTable rep0 -> Int -> NoOp rep -> [TPrimExp Int64 VName] -> Maybe Indexed Source #

OpReturns (HostOp (NoOp :: Type -> Type) (Aliases GPUMem)) Source # 
Instance details

Defined in Futhark.IR.GPUMem

Methods

opReturns :: forall rep (inner :: Type -> Type) m. (Mem rep inner, Monad m, HasScope rep m) => HostOp NoOp (Aliases GPUMem) -> m [ExpReturns] Source #

OpReturns (HostOp (NoOp :: Type -> Type) GPUMem) Source # 
Instance details

Defined in Futhark.IR.GPUMem

Methods

opReturns :: forall rep (inner :: Type -> Type) m. (Mem rep inner, Monad m, HasScope rep m) => HostOp NoOp GPUMem -> m [ExpReturns] Source #

OpReturns (HostOp (NoOp :: Type -> Type) (Wise GPUMem)) Source # 
Instance details

Defined in Futhark.IR.GPUMem

Methods

opReturns :: forall rep (inner :: Type -> Type) m. (Mem rep inner, Monad m, HasScope rep m) => HostOp NoOp (Wise GPUMem) -> m [ExpReturns] Source #

OpReturns (MCOp (NoOp :: Type -> Type) (Aliases MCMem)) Source # 
Instance details

Defined in Futhark.IR.MCMem

Methods

opReturns :: forall rep (inner :: Type -> Type) m. (Mem rep inner, Monad m, HasScope rep m) => MCOp NoOp (Aliases MCMem) -> m [ExpReturns] Source #

OpReturns (MCOp (NoOp :: Type -> Type) MCMem) Source # 
Instance details

Defined in Futhark.IR.MCMem

Methods

opReturns :: forall rep (inner :: Type -> Type) m. (Mem rep inner, Monad m, HasScope rep m) => MCOp NoOp MCMem -> m [ExpReturns] Source #

OpReturns (MCOp (NoOp :: Type -> Type) (Wise MCMem)) Source # 
Instance details

Defined in Futhark.IR.MCMem

Methods

opReturns :: forall rep (inner :: Type -> Type) m. (Mem rep inner, Monad m, HasScope rep m) => MCOp NoOp (Wise MCMem) -> m [ExpReturns] Source #

OpReturns (NoOp rep) Source # 
Instance details

Defined in Futhark.IR.Mem

Methods

opReturns :: forall rep0 (inner :: Type -> Type) m. (Mem rep0 inner, Monad m, HasScope rep0 m) => NoOp rep -> m [ExpReturns] Source #

IsOp (NoOp rep) Source # 
Instance details

Defined in Futhark.IR.Prop

Methods

safeOp :: NoOp rep -> Bool Source #

cheapOp :: NoOp rep -> Bool Source #

opDependencies :: NoOp rep -> [Names] Source #

AliasedOp (NoOp rep) Source # 
Instance details

Defined in Futhark.IR.Prop.Aliases

Methods

opAliases :: NoOp rep -> [Names] Source #

consumedInOp :: NoOp rep -> Names Source #

FreeIn (NoOp rep) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: NoOp rep -> FV Source #

TypedOp (NoOp rep) Source # 
Instance details

Defined in Futhark.IR.Prop.TypeOf

Methods

opType :: HasScope t m => NoOp rep -> m [ExtType] Source #

TopDownHelper (HostOp (NoOp :: Type -> Type) (Aliases GPUMem)) Source # 
Instance details

Defined in Futhark.Optimise.ArrayShortCircuiting.TopdownAnalysis

TopDownHelper (NoOp rep) Source # 
Instance details

Defined in Futhark.Optimise.ArrayShortCircuiting.TopdownAnalysis

Methods

innerNonNegatives :: [VName] -> NoOp rep -> Names

innerKnownLessThan :: NoOp rep -> [(VName, PrimExp VName)]

scopeHelper :: NoOp rep -> Scope rep0

CSEInOp (NoOp rep) Source # 
Instance details

Defined in Futhark.Optimise.CSE

Methods

cseInOp :: NoOp rep -> CSEM rep0 (NoOp rep)

SizeSubst (NoOp rep) Source # 
Instance details

Defined in Futhark.Pass.ExplicitAllocations

Methods

opIsConst :: NoOp rep -> Bool Source #

Rename (NoOp rep) Source # 
Instance details

Defined in Futhark.Transform.Rename

Methods

rename :: NoOp rep -> RenameM (NoOp rep) Source #

Substitute (NoOp rep) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> NoOp rep -> NoOp rep Source #

Eq (NoOp rep) Source # 
Instance details

Defined in Futhark.IR.Rep

Methods

(==) :: NoOp rep -> NoOp rep -> Bool #

(/=) :: NoOp rep -> NoOp rep -> Bool #

Ord (NoOp rep) Source # 
Instance details

Defined in Futhark.IR.Rep

Methods

compare :: NoOp rep -> NoOp rep -> Ordering #

(<) :: NoOp rep -> NoOp rep -> Bool #

(<=) :: NoOp rep -> NoOp rep -> Bool #

(>) :: NoOp rep -> NoOp rep -> Bool #

(>=) :: NoOp rep -> NoOp rep -> Bool #

max :: NoOp rep -> NoOp rep -> NoOp rep #

min :: NoOp rep -> NoOp rep -> NoOp rep #

Pretty (NoOp rep) Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: NoOp rep -> Doc ann #

prettyList :: [NoOp rep] -> Doc ann #