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

Futhark.Optimise.Simplify.Lore

Description

Definition of the lore used by the simplification engine.

Synopsis

Documentation

data Wise lore Source #

Instances

Instances details
(Decorations lore, CanBeWise (Op lore)) => Decorations (Wise lore) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Associated Types

type LetDec (Wise lore) Source #

type ExpDec (Wise lore) Source #

type BodyDec (Wise lore) Source #

type FParamInfo (Wise lore) Source #

type LParamInfo (Wise lore) Source #

type RetType (Wise lore) Source #

type BranchType (Wise lore) Source #

type Op (Wise lore) Source #

(PrettyLore lore, CanBeWise (Op lore)) => PrettyLore (Wise lore) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Methods

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

(ASTLore lore, CanBeWise (Op lore)) => ASTLore (Wise lore) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Methods

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

(ASTLore lore, CanBeWise (Op lore)) => Aliased (Wise lore) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Methods

bodyAliases :: Body (Wise lore) -> [Names] Source #

consumedInBody :: Body (Wise lore) -> Names Source #

(Bindable lore, CanBeWise (Op lore)) => Bindable (Wise lore) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Methods

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

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

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

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

BinderOps (Wise Seq) Source # 
Instance details

Defined in Futhark.IR.Seq

Methods

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

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

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

BinderOps (Wise SOACS) Source # 
Instance details

Defined in Futhark.IR.SOACS.Simplify

BinderOps (Wise MCMem) Source # 
Instance details

Defined in Futhark.IR.MCMem

BinderOps (Wise MC) Source # 
Instance details

Defined in Futhark.IR.MC

Methods

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

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

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

BinderOps (Wise SeqMem) Source # 
Instance details

Defined in Futhark.IR.SeqMem

BinderOps (Wise Kernels) Source # 
Instance details

Defined in Futhark.IR.Kernels.Simplify

BinderOps (Wise KernelsMem) Source # 
Instance details

Defined in Futhark.IR.KernelsMem

HasSOAC (Wise SOACS) Source # 
Instance details

Defined in Futhark.IR.SOACS.Simplify

HasSOAC (Wise Kernels) Source # 
Instance details

Defined in Futhark.IR.Kernels.Simplify

HasSegOp (Wise MC) Source # 
Instance details

Defined in Futhark.IR.MC

Associated Types

type SegOpLevel (Wise MC) Source #

HasSegOp (Wise Kernels) Source # 
Instance details

Defined in Futhark.IR.Kernels.Simplify

Associated Types

type SegOpLevel (Wise Kernels) Source #

SimplifiableLore lore => LocalScope (Wise lore) (SimpleM lore) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

Methods

localScope :: Scope (Wise lore) -> SimpleM lore a -> SimpleM lore a Source #

SimplifiableLore lore => HasScope (Wise lore) (SimpleM lore) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

Methods

lookupType :: VName -> SimpleM lore Type Source #

lookupInfo :: VName -> SimpleM lore (NameInfo (Wise lore)) Source #

askScope :: SimpleM lore (Scope (Wise lore)) Source #

asksScope :: (Scope (Wise lore) -> a) -> SimpleM lore a Source #

type LetDec (Wise lore) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

type LetDec (Wise lore) = (VarWisdom, LetDec lore)
type ExpDec (Wise lore) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

type ExpDec (Wise lore) = (ExpWisdom, ExpDec lore)
type BodyDec (Wise lore) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

type BodyDec (Wise lore)
type FParamInfo (Wise lore) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

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

Defined in Futhark.Optimise.Simplify.Lore

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

Defined in Futhark.Optimise.Simplify.Lore

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

Defined in Futhark.Optimise.Simplify.Lore

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

Defined in Futhark.Optimise.Simplify.Lore

type Op (Wise lore) = OpWithWisdom (Op lore)
type SegOpLevel (Wise MC) Source # 
Instance details

Defined in Futhark.IR.MC

type SegOpLevel (Wise MC) = ()
type SegOpLevel (Wise Kernels) Source # 
Instance details

Defined in Futhark.IR.Kernels.Simplify

newtype VarWisdom Source #

The wisdom of the let-bound variable.

Constructors

VarWisdom 

Instances

Instances details
Eq VarWisdom Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Ord VarWisdom Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Show VarWisdom Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Pretty VarWisdom Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Methods

ppr :: VarWisdom -> Doc #

pprPrec :: Int -> VarWisdom -> Doc #

pprList :: [VarWisdom] -> Doc #

FreeIn VarWisdom Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Methods

freeIn' :: VarWisdom -> FV Source #

Substitute VarWisdom Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Rename VarWisdom Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

AliasesOf (VarWisdom, dec) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Methods

aliasesOf :: (VarWisdom, dec) -> Names Source #

removeStmWisdom :: CanBeWise (Op lore) => Stm (Wise lore) -> Stm lore Source #

removeLambdaWisdom :: CanBeWise (Op lore) => Lambda (Wise lore) -> Lambda lore Source #

removeFunDefWisdom :: CanBeWise (Op lore) => FunDef (Wise lore) -> FunDef lore Source #

removeExpWisdom :: CanBeWise (Op lore) => Exp (Wise lore) -> Exp lore Source #

removeBodyWisdom :: CanBeWise (Op lore) => Body (Wise lore) -> Body lore Source #

addWisdomToPattern :: (ASTLore lore, CanBeWise (Op lore)) => Pattern lore -> Exp (Wise lore) -> Pattern (Wise lore) Source #

mkWiseBody :: (ASTLore lore, CanBeWise (Op lore)) => BodyDec lore -> Stms (Wise lore) -> Result -> Body (Wise lore) Source #

mkWiseLetStm :: (ASTLore lore, CanBeWise (Op lore)) => Pattern lore -> StmAux (ExpDec lore) -> Exp (Wise lore) -> Stm (Wise lore) Source #

mkWiseExpDec :: (ASTLore lore, CanBeWise (Op lore)) => Pattern (Wise lore) -> ExpDec lore -> Exp (Wise lore) -> ExpDec (Wise lore) Source #

class (AliasedOp (OpWithWisdom op), IsOp (OpWithWisdom op)) => CanBeWise op where Source #

Associated Types

type OpWithWisdom op :: Type Source #

Methods

removeOpWisdom :: OpWithWisdom op -> op Source #

Instances

Instances details
CanBeWise () Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Associated Types

type OpWithWisdom () Source #

Methods

removeOpWisdom :: OpWithWisdom () -> () Source #

(ASTLore lore, CanBeWise (Op lore)) => CanBeWise (SOAC lore) Source # 
Instance details

Defined in Futhark.IR.SOACS.SOAC

Associated Types

type OpWithWisdom (SOAC lore) Source #

Methods

removeOpWisdom :: OpWithWisdom (SOAC lore) -> SOAC lore Source #

CanBeWise inner => CanBeWise (MemOp inner) Source # 
Instance details

Defined in Futhark.IR.Mem

Associated Types

type OpWithWisdom (MemOp inner) Source #

Methods

removeOpWisdom :: OpWithWisdom (MemOp inner) -> MemOp inner Source #

(CanBeWise (Op lore), ASTLore lore, ASTConstraints lvl) => CanBeWise (SegOp lvl lore) Source # 
Instance details

Defined in Futhark.IR.SegOp

Associated Types

type OpWithWisdom (SegOp lvl lore) Source #

Methods

removeOpWisdom :: OpWithWisdom (SegOp lvl lore) -> SegOp lvl lore Source #

(CanBeWise (Op lore), CanBeWise op, ASTLore lore) => CanBeWise (MCOp lore op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Associated Types

type OpWithWisdom (MCOp lore op) Source #

Methods

removeOpWisdom :: OpWithWisdom (MCOp lore op) -> MCOp lore op Source #

(CanBeWise (Op lore), CanBeWise op, ASTLore lore) => CanBeWise (HostOp lore op) Source # 
Instance details

Defined in Futhark.IR.Kernels.Kernel

Associated Types

type OpWithWisdom (HostOp lore op) Source #

Methods

removeOpWisdom :: OpWithWisdom (HostOp lore op) -> HostOp lore op Source #