futhark-0.25.30: An optimising compiler for a functional, array-oriented language.
Safe HaskellNone
LanguageGHC2021

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 Source #

Decoration for every let-pattern element.

type LetDec l = Type

type ExpDec l Source #

Decoration for every expression.

type ExpDec l = ()

type BodyDec l Source #

Decoration for every body.

type BodyDec l = ()

type FParamInfo l Source #

Decoration for every (non-lambda) function parameter.

type LParamInfo l Source #

Decoration for every lambda function parameter.

type LParamInfo l = Type

type RetType l Source #

The return type decoration of function calls.

type BranchType l 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 :: Type -> Type

Instances

Instances details
RepTypes GPU Source # 
Instance details

Defined in Futhark.IR.GPU

Associated Types

type LetDec GPU 
Instance details

Defined in Futhark.IR.GPU

type LetDec GPU = Type
type ExpDec GPU 
Instance details

Defined in Futhark.IR.GPU

type ExpDec GPU = ()
type BodyDec GPU 
Instance details

Defined in Futhark.IR.GPU

type BodyDec GPU = ()
type FParamInfo GPU 
Instance details

Defined in Futhark.IR.GPU

type LParamInfo GPU 
Instance details

Defined in Futhark.IR.GPU

type RetType GPU 
Instance details

Defined in Futhark.IR.GPU

type BranchType GPU 
Instance details

Defined in Futhark.IR.GPU

type OpC GPU 
Instance details

Defined in Futhark.IR.GPU

RepTypes GPUMem Source # 
Instance details

Defined in Futhark.IR.GPUMem

Associated Types

type LetDec GPUMem 
Instance details

Defined in Futhark.IR.GPUMem

type ExpDec GPUMem 
Instance details

Defined in Futhark.IR.GPUMem

type ExpDec GPUMem = ()
type BodyDec GPUMem 
Instance details

Defined in Futhark.IR.GPUMem

type BodyDec GPUMem = ()
type FParamInfo GPUMem 
Instance details

Defined in Futhark.IR.GPUMem

type LParamInfo GPUMem 
Instance details

Defined in Futhark.IR.GPUMem

type RetType GPUMem 
Instance details

Defined in Futhark.IR.GPUMem

type BranchType GPUMem 
Instance details

Defined in Futhark.IR.GPUMem

type OpC GPUMem 
Instance details

Defined in Futhark.IR.GPUMem

type OpC GPUMem = MemOp (HostOp (NoOp :: Type -> Type))
RepTypes MC Source # 
Instance details

Defined in Futhark.IR.MC

Associated Types

type LetDec MC 
Instance details

Defined in Futhark.IR.MC

type LetDec MC = Type
type ExpDec MC 
Instance details

Defined in Futhark.IR.MC

type ExpDec MC = ()
type BodyDec MC 
Instance details

Defined in Futhark.IR.MC

type BodyDec MC = ()
type FParamInfo MC 
Instance details

Defined in Futhark.IR.MC

type LParamInfo MC 
Instance details

Defined in Futhark.IR.MC

type RetType MC 
Instance details

Defined in Futhark.IR.MC

type BranchType MC 
Instance details

Defined in Futhark.IR.MC

type OpC MC 
Instance details

Defined in Futhark.IR.MC

type OpC MC = MCOp SOAC
RepTypes MCMem Source # 
Instance details

Defined in Futhark.IR.MCMem

Associated Types

type LetDec MCMem 
Instance details

Defined in Futhark.IR.MCMem

type ExpDec MCMem 
Instance details

Defined in Futhark.IR.MCMem

type ExpDec MCMem = ()
type BodyDec MCMem 
Instance details

Defined in Futhark.IR.MCMem

type BodyDec MCMem = ()
type FParamInfo MCMem 
Instance details

Defined in Futhark.IR.MCMem

type LParamInfo MCMem 
Instance details

Defined in Futhark.IR.MCMem

type RetType MCMem 
Instance details

Defined in Futhark.IR.MCMem

type BranchType MCMem 
Instance details

Defined in Futhark.IR.MCMem

type OpC MCMem 
Instance details

Defined in Futhark.IR.MCMem

type OpC MCMem = MemOp (MCOp (NoOp :: Type -> Type))
RepTypes SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

Associated Types

type LetDec SOACS 
Instance details

Defined in Futhark.IR.SOACS

type ExpDec SOACS 
Instance details

Defined in Futhark.IR.SOACS

type ExpDec SOACS = ()
type BodyDec SOACS 
Instance details

Defined in Futhark.IR.SOACS

type BodyDec SOACS = ()
type FParamInfo SOACS 
Instance details

Defined in Futhark.IR.SOACS

type LParamInfo SOACS 
Instance details

Defined in Futhark.IR.SOACS

type RetType SOACS 
Instance details

Defined in Futhark.IR.SOACS

type BranchType SOACS 
Instance details

Defined in Futhark.IR.SOACS

type OpC SOACS 
Instance details

Defined in Futhark.IR.SOACS

type OpC SOACS = SOAC
RepTypes Seq Source # 
Instance details

Defined in Futhark.IR.Seq

Associated Types

type LetDec Seq 
Instance details

Defined in Futhark.IR.Seq

type LetDec Seq = Type
type ExpDec Seq 
Instance details

Defined in Futhark.IR.Seq

type ExpDec Seq = ()
type BodyDec Seq 
Instance details

Defined in Futhark.IR.Seq

type BodyDec Seq = ()
type FParamInfo Seq 
Instance details

Defined in Futhark.IR.Seq

type LParamInfo Seq 
Instance details

Defined in Futhark.IR.Seq

type RetType Seq 
Instance details

Defined in Futhark.IR.Seq

type BranchType Seq 
Instance details

Defined in Futhark.IR.Seq

type OpC Seq 
Instance details

Defined in Futhark.IR.Seq

type OpC Seq = NoOp :: Type -> Type
RepTypes SeqMem Source # 
Instance details

Defined in Futhark.IR.SeqMem

Associated Types

type LetDec SeqMem 
Instance details

Defined in Futhark.IR.SeqMem

type ExpDec SeqMem 
Instance details

Defined in Futhark.IR.SeqMem

type ExpDec SeqMem = ()
type BodyDec SeqMem 
Instance details

Defined in Futhark.IR.SeqMem

type BodyDec SeqMem = ()
type FParamInfo SeqMem 
Instance details

Defined in Futhark.IR.SeqMem

type LParamInfo SeqMem 
Instance details

Defined in Futhark.IR.SeqMem

type RetType SeqMem 
Instance details

Defined in Futhark.IR.SeqMem

type BranchType SeqMem 
Instance details

Defined in Futhark.IR.SeqMem

type OpC SeqMem 
Instance details

Defined in Futhark.IR.SeqMem

type OpC SeqMem = MemOp (NoOp :: Type -> Type)
(RepTypes rep, ASTConstraints (OpC rep (Aliases rep))) => RepTypes (Aliases rep) Source # 
Instance details

Defined in Futhark.IR.Aliases

Associated Types

type LetDec (Aliases rep) 
Instance details

Defined in Futhark.IR.Aliases

type LetDec (Aliases rep) = (VarAliases, LetDec rep)
type ExpDec (Aliases rep) 
Instance details

Defined in Futhark.IR.Aliases

type ExpDec (Aliases rep) = (ConsumedInExp, ExpDec rep)
type BodyDec (Aliases rep) 
Instance details

Defined in Futhark.IR.Aliases

type BodyDec (Aliases rep) = (BodyAliasing, BodyDec rep)
type FParamInfo (Aliases rep) 
Instance details

Defined in Futhark.IR.Aliases

type FParamInfo (Aliases rep) = FParamInfo rep
type LParamInfo (Aliases rep) 
Instance details

Defined in Futhark.IR.Aliases

type LParamInfo (Aliases rep) = LParamInfo rep
type RetType (Aliases rep) 
Instance details

Defined in Futhark.IR.Aliases

type RetType (Aliases rep) = RetType rep
type BranchType (Aliases rep) 
Instance details

Defined in Futhark.IR.Aliases

type BranchType (Aliases rep) = BranchType rep
type OpC (Aliases rep) 
Instance details

Defined in Futhark.IR.Aliases

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

Defined in Futhark.Optimise.Simplify.Rep

Associated Types

type LetDec (Wise rep) 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

type LetDec (Wise rep) = (VarWisdom, LetDec rep)
type ExpDec (Wise rep) 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

type ExpDec (Wise rep) = (ExpWisdom, ExpDec rep)
type BodyDec (Wise rep) 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

type BodyDec (Wise rep)
type FParamInfo (Wise rep) 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

type FParamInfo (Wise rep) = FParamInfo rep
type LParamInfo (Wise rep) 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

type LParamInfo (Wise rep) = LParamInfo rep
type RetType (Wise rep) 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

type RetType (Wise rep) = RetType rep
type BranchType (Wise rep) 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

type BranchType (Wise rep) = BranchType rep
type OpC (Wise rep) 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

type OpC (Wise rep) = OpC rep

type Op l = OpC l l Source #

Apply the OpC constructor of a representation to that representation.

data NoOp (rep :: k) 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 #

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

Defined in Futhark.IR.GPU.Op

Methods

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

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

Defined in Futhark.IR.MC.Op

Methods

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

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

Defined in Futhark.IR.Mem

Methods

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

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

Defined in Futhark.IR.Prop

Methods

safeOp :: ASTRep rep => NoOp rep -> Bool Source #

cheapOp :: ASTRep rep => NoOp rep -> Bool Source #

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

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

Defined in Futhark.IR.Prop.Aliases

Methods

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

consumedInOp :: Aliased rep => NoOp rep -> Names Source #

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

Defined in Futhark.IR.Prop.TypeOf

Methods

opType :: HasScope rep m => NoOp rep -> m [ExtType] 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 #

FreeIn (NoOp rep) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: NoOp rep -> FV 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 #