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

Futhark.Optimise.Simplify.Rep

Description

Representation used by the simplification engine.

Synopsis

Documentation

data Wise rep Source #

Instances

Instances details
(RepTypes rep, CanBeWise (Op 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 Op (Wise rep) Source #

(PrettyRep rep, CanBeWise (Op rep)) => PrettyRep (Wise rep) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

Methods

ppExpDec :: ExpDec (Wise rep) -> Exp (Wise rep) -> Maybe Doc Source #

TraverseOpStms (Wise Seq) Source # 
Instance details

Defined in Futhark.IR.Seq

TraverseOpStms (Wise SOACS) Source # 
Instance details

Defined in Futhark.IR.SOACS.Simplify

TraverseOpStms (Wise SeqMem) Source # 
Instance details

Defined in Futhark.IR.SeqMem

TraverseOpStms (Wise MCMem) Source # 
Instance details

Defined in Futhark.IR.MCMem

TraverseOpStms (Wise MC) Source # 
Instance details

Defined in Futhark.IR.MC

TraverseOpStms (Wise GPU) Source # 
Instance details

Defined in Futhark.IR.GPU.Simplify

TraverseOpStms (Wise GPUMem) Source # 
Instance details

Defined in Futhark.IR.GPUMem

(ASTRep rep, CanBeWise (Op rep)) => ASTRep (Wise rep) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

Methods

expTypesFromPat :: (HasScope (Wise rep) m, Monad m) => Pat (LetDec (Wise rep)) -> m [BranchType (Wise rep)] Source #

(ASTRep rep, CanBeWise (Op rep)) => Aliased (Wise rep) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

(Buildable rep, CanBeWise (Op rep)) => Buildable (Wise rep) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

Methods

mkExpPat :: [Ident] -> Exp (Wise rep) -> Pat (LetDec (Wise rep)) Source #

mkExpDec :: Pat (LetDec (Wise rep)) -> Exp (Wise rep) -> ExpDec (Wise rep) Source #

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

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

BuilderOps (Wise Seq) Source # 
Instance details

Defined in Futhark.IR.Seq

Methods

mkExpDecB :: (MonadBuilder m, Rep m ~ Wise Seq) => Pat (LetDec (Wise Seq)) -> Exp (Wise Seq) -> m (ExpDec (Wise Seq)) Source #

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

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

BuilderOps (Wise SOACS) Source # 
Instance details

Defined in Futhark.IR.SOACS.Simplify

BuilderOps (Wise SeqMem) Source # 
Instance details

Defined in Futhark.IR.SeqMem

BuilderOps (Wise MCMem) Source # 
Instance details

Defined in Futhark.IR.MCMem

BuilderOps (Wise MC) Source # 
Instance details

Defined in Futhark.IR.MC

Methods

mkExpDecB :: (MonadBuilder m, Rep m ~ Wise MC) => Pat (LetDec (Wise MC)) -> Exp (Wise MC) -> m (ExpDec (Wise MC)) Source #

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

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

BuilderOps (Wise GPU) Source # 
Instance details

Defined in Futhark.IR.GPU.Simplify

Methods

mkExpDecB :: (MonadBuilder m, Rep m ~ Wise GPU) => Pat (LetDec (Wise GPU)) -> Exp (Wise GPU) -> m (ExpDec (Wise GPU)) Source #

mkBodyB :: (MonadBuilder m, Rep m ~ Wise GPU) => Stms (Wise GPU) -> Result -> m (Body (Wise GPU)) Source #

mkLetNamesB :: (MonadBuilder m, Rep m ~ Wise GPU) => [VName] -> Exp (Wise GPU) -> m (Stm (Wise GPU)) Source #

BuilderOps (Wise GPUMem) Source # 
Instance details

Defined in Futhark.IR.GPUMem

HasSOAC (Wise SOACS) Source # 
Instance details

Defined in Futhark.IR.SOACS.Simplify

HasSOAC (Wise GPU) Source # 
Instance details

Defined in Futhark.IR.GPU.Simplify

HasSegOp (Wise MC) Source # 
Instance details

Defined in Futhark.IR.MC

Associated Types

type SegOpLevel (Wise MC) Source #

HasSegOp (Wise GPU) Source # 
Instance details

Defined in Futhark.IR.GPU.Simplify

Associated Types

type SegOpLevel (Wise GPU) Source #

SimplifiableRep rep => LocalScope (Wise rep) (SimpleM rep) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

Methods

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

SimplifiableRep rep => HasScope (Wise rep) (SimpleM rep) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

Methods

lookupType :: VName -> SimpleM rep Type Source #

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

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

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

OpReturns (MCOp (Wise MCMem) ()) Source # 
Instance details

Defined in Futhark.IR.MCMem

Methods

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

OpReturns (HostOp (Wise GPUMem) ()) Source # 
Instance details

Defined in Futhark.IR.GPUMem

Methods

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

type LetDec (Wise rep) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

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

Defined in Futhark.Optimise.Simplify.Rep

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

Defined in Futhark.Optimise.Simplify.Rep

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

Defined in Futhark.Optimise.Simplify.Rep

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

Defined in Futhark.Optimise.Simplify.Rep

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

Defined in Futhark.Optimise.Simplify.Rep

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

Defined in Futhark.Optimise.Simplify.Rep

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

Defined in Futhark.Optimise.Simplify.Rep

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

Defined in Futhark.IR.MC

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

Defined in Futhark.IR.GPU.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.Rep

Ord VarWisdom Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

Show VarWisdom Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

Pretty VarWisdom Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

Methods

ppr :: VarWisdom -> Doc #

pprPrec :: Int -> VarWisdom -> Doc #

pprList :: [VarWisdom] -> Doc #

FreeIn VarWisdom Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

Methods

freeIn' :: VarWisdom -> FV Source #

Substitute VarWisdom Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

Rename VarWisdom Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

AliasesOf (VarWisdom, dec) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

Methods

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

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

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

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

addWisdomToPat :: (ASTRep rep, CanBeWise (Op rep)) => Pat (LetDec rep) -> Exp (Wise rep) -> Pat (LetDec (Wise rep)) Source #

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

mkWiseLetStm :: (ASTRep rep, CanBeWise (Op rep)) => Pat (LetDec rep) -> StmAux (ExpDec rep) -> Exp (Wise rep) -> Stm (Wise rep) Source #

mkWiseExpDec :: (ASTRep rep, CanBeWise (Op rep)) => Pat (LetDec (Wise rep)) -> ExpDec rep -> Exp (Wise rep) -> ExpDec (Wise rep) Source #

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

Associated Types

type OpWithWisdom op :: Type Source #

Instances

Instances details
CanBeWise () Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

Associated Types

type OpWithWisdom () Source #

(ASTRep rep, CanBeWise (Op rep)) => CanBeWise (SOAC rep) Source # 
Instance details

Defined in Futhark.IR.SOACS.SOAC

Associated Types

type OpWithWisdom (SOAC rep) 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 #

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

(CanBeWise (Op rep), ASTRep rep, ASTConstraints lvl) => CanBeWise (SegOp lvl rep) Source # 
Instance details

Defined in Futhark.IR.SegOp

Associated Types

type OpWithWisdom (SegOp lvl rep) Source #

Methods

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

addOpWisdom :: SegOp lvl rep -> OpWithWisdom (SegOp lvl rep) Source #

(CanBeWise (Op rep), CanBeWise op, ASTRep rep) => CanBeWise (MCOp rep op) Source # 
Instance details

Defined in Futhark.IR.MC.Op

Associated Types

type OpWithWisdom (MCOp rep op) Source #

Methods

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

addOpWisdom :: MCOp rep op -> OpWithWisdom (MCOp rep op) Source #

(CanBeWise (Op rep), CanBeWise op, ASTRep rep) => CanBeWise (HostOp rep op) Source # 
Instance details

Defined in Futhark.IR.GPU.Op

Associated Types

type OpWithWisdom (HostOp rep op) Source #

Methods

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

addOpWisdom :: HostOp rep op -> OpWithWisdom (HostOp rep op) Source #

Constructing representation

type Informing rep = (ASTRep rep, CanBeWise (Op rep)) Source #

Constraints that let us transform a representation into a Wise representation.

informStms :: Informing rep => Stms rep -> Stms (Wise rep) Source #