futhark-0.9.1: An optimising compiler for a functional, array-oriented language.

Safe HaskellNone
LanguageHaskell2010

Futhark.Analysis.SymbolTable

Contents

Synopsis

Documentation

data SymbolTable lore Source #

Instances
Semigroup (SymbolTable lore) Source # 
Instance details

Defined in Futhark.Analysis.SymbolTable

Methods

(<>) :: SymbolTable lore -> SymbolTable lore -> SymbolTable lore #

sconcat :: NonEmpty (SymbolTable lore) -> SymbolTable lore #

stimes :: Integral b => b -> SymbolTable lore -> SymbolTable lore #

Monoid (SymbolTable lore) Source # 
Instance details

Defined in Futhark.Analysis.SymbolTable

Methods

mempty :: SymbolTable lore #

mappend :: SymbolTable lore -> SymbolTable lore -> SymbolTable lore #

mconcat :: [SymbolTable lore] -> SymbolTable lore #

fromScope :: Attributes lore => Scope lore -> SymbolTable lore Source #

toScope :: SymbolTable lore -> Scope lore Source #

castSymbolTable :: (SameScope from to, ExpAttr from ~ ExpAttr to, BodyAttr from ~ BodyAttr to, RetType from ~ RetType to, BranchType from ~ BranchType to) => SymbolTable from -> SymbolTable to Source #

Try to convert a symbol table for one representation into a symbol table for another. The two symbol tables will have the same keys, but some entries may be diferent (i.e. some expression entries will have been turned into free variable entries).

Entries

data Entry lore Source #

entryStm :: Entry lore -> Maybe (Stm lore) Source #

entryType :: Attributes lore => Entry lore -> Type Source #

Lookup

lookup :: VName -> SymbolTable lore -> Maybe (Entry lore) Source #

lookupStm :: VName -> SymbolTable lore -> Maybe (Stm lore) Source #

available :: VName -> SymbolTable lore -> Bool Source #

In symbol table and not consumed.

class IndexOp op where Source #

Minimal complete definition

Nothing

Methods

indexOp :: (Attributes lore, IndexOp (Op lore)) => SymbolTable lore -> Int -> op -> [PrimExp VName] -> Maybe (PrimExp VName, Certificates) Source #

Instances
IndexOp () Source # 
Instance details

Defined in Futhark.Analysis.SymbolTable

Methods

indexOp :: (Attributes lore, IndexOp (Op lore)) => SymbolTable lore -> Int -> () -> [PrimExp VName] -> Maybe (PrimExp VName, Certificates) Source #

Annotations lore => IndexOp (SOAC lore) Source # 
Instance details

Defined in Futhark.Representation.SOACS.SOAC

Methods

indexOp :: (Attributes lore0, IndexOp (Op lore0)) => SymbolTable lore0 -> Int -> SOAC lore -> [PrimExp VName] -> Maybe (PrimExp VName, Certificates) Source #

IndexOp (KernelExp lore) Source # 
Instance details

Defined in Futhark.Representation.Kernels.KernelExp

Methods

indexOp :: (Attributes lore0, IndexOp (Op lore0)) => SymbolTable lore0 -> Int -> KernelExp lore -> [PrimExp VName] -> Maybe (PrimExp VName, Certificates) Source #

Attributes lore => IndexOp (Kernel lore) Source # 
Instance details

Defined in Futhark.Representation.Kernels.Kernel

Methods

indexOp :: (Attributes lore0, IndexOp (Op lore0)) => SymbolTable lore0 -> Int -> Kernel lore -> [PrimExp VName] -> Maybe (PrimExp VName, Certificates) Source #

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

Defined in Futhark.Representation.ExplicitMemory

Methods

indexOp :: (Attributes lore, IndexOp (Op lore)) => SymbolTable lore -> Int -> MemOp inner -> [PrimExp VName] -> Maybe (PrimExp VName, Certificates) Source #

Insertion

insertStm :: (IndexOp (Op lore), Ranged lore, Aliased lore) => Stm lore -> SymbolTable lore -> SymbolTable lore Source #

insertFParams :: Attributes lore => [FParam lore] -> SymbolTable lore -> SymbolTable lore Source #

insertLParam :: Attributes lore => LParam lore -> SymbolTable lore -> SymbolTable lore Source #

Bounds

Misc