Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data SymbolTable lore
- empty :: SymbolTable lore
- fromScope :: ASTLore lore => Scope lore -> SymbolTable lore
- toScope :: SymbolTable lore -> Scope lore
- data Entry lore
- deepen :: SymbolTable lore -> SymbolTable lore
- entryDepth :: Entry lore -> Int
- entryLetBoundDec :: Entry lore -> Maybe (LetDec lore)
- entryIsSize :: Entry lore -> Bool
- elem :: VName -> SymbolTable lore -> Bool
- lookup :: VName -> SymbolTable lore -> Maybe (Entry lore)
- lookupStm :: VName -> SymbolTable lore -> Maybe (Stm lore)
- lookupExp :: VName -> SymbolTable lore -> Maybe (Exp lore, Certificates)
- lookupBasicOp :: VName -> SymbolTable lore -> Maybe (BasicOp, Certificates)
- lookupType :: ASTLore lore => VName -> SymbolTable lore -> Maybe Type
- lookupSubExp :: VName -> SymbolTable lore -> Maybe (SubExp, Certificates)
- lookupAliases :: VName -> SymbolTable lore -> Names
- lookupLoopVar :: VName -> SymbolTable lore -> Maybe SubExp
- available :: VName -> SymbolTable lore -> Bool
- consume :: VName -> SymbolTable lore -> SymbolTable lore
- index :: ASTLore lore => VName -> [SubExp] -> SymbolTable lore -> Maybe Indexed
- index' :: VName -> [PrimExp VName] -> SymbolTable lore -> Maybe Indexed
- data Indexed
- indexedAddCerts :: Certificates -> Indexed -> Indexed
- class IndexOp op where
- insertStm :: (ASTLore lore, IndexOp (Op lore), Aliased lore) => Stm lore -> SymbolTable lore -> SymbolTable lore
- insertStms :: (ASTLore lore, IndexOp (Op lore), Aliased lore) => Stms lore -> SymbolTable lore -> SymbolTable lore
- insertFParams :: ASTLore lore => [FParam lore] -> SymbolTable lore -> SymbolTable lore
- insertLParam :: ASTLore lore => LParam lore -> SymbolTable lore -> SymbolTable lore
- insertLoopVar :: ASTLore lore => VName -> IntType -> SubExp -> SymbolTable lore -> SymbolTable lore
- hideCertified :: Names -> SymbolTable lore -> SymbolTable lore
Documentation
data SymbolTable lore Source #
Instances
Semigroup (SymbolTable lore) Source # | |
Defined in Futhark.Analysis.SymbolTable (<>) :: SymbolTable lore -> SymbolTable lore -> SymbolTable lore # sconcat :: NonEmpty (SymbolTable lore) -> SymbolTable lore # stimes :: Integral b => b -> SymbolTable lore -> SymbolTable lore # | |
Monoid (SymbolTable lore) Source # | |
Defined in Futhark.Analysis.SymbolTable mempty :: SymbolTable lore # mappend :: SymbolTable lore -> SymbolTable lore -> SymbolTable lore # mconcat :: [SymbolTable lore] -> SymbolTable lore # |
empty :: SymbolTable lore Source #
toScope :: SymbolTable lore -> Scope lore Source #
Entries
deepen :: SymbolTable lore -> SymbolTable lore Source #
entryDepth :: Entry lore -> Int Source #
entryIsSize :: Entry lore -> Bool Source #
True if this name has been used as an array size, implying that it is non-negative.
Lookup
lookupExp :: VName -> SymbolTable lore -> Maybe (Exp lore, Certificates) Source #
lookupBasicOp :: VName -> SymbolTable lore -> Maybe (BasicOp, Certificates) Source #
lookupType :: ASTLore lore => VName -> SymbolTable lore -> Maybe Type Source #
lookupSubExp :: VName -> SymbolTable lore -> Maybe (SubExp, Certificates) Source #
lookupAliases :: VName -> SymbolTable lore -> Names Source #
lookupLoopVar :: VName -> SymbolTable lore -> Maybe SubExp Source #
If the given variable name is the name of a ForLoop
parameter,
then return the bound of that loop.
consume :: VName -> SymbolTable lore -> SymbolTable lore Source #
The result of indexing a delayed array.
Indexed Certificates (PrimExp VName) | A PrimExp based on the indexes (that is, without accessing any actual array). |
IndexedArray Certificates VName [PrimExp VName] | The indexing corresponds to another (perhaps more advantageous) array. |
indexedAddCerts :: Certificates -> Indexed -> Indexed Source #
class IndexOp op where Source #
Nothing
indexOp :: (ASTLore lore, IndexOp (Op lore)) => SymbolTable lore -> Int -> op -> [PrimExp VName] -> Maybe Indexed Source #
Insertion
insertStm :: (ASTLore lore, IndexOp (Op lore), Aliased lore) => Stm lore -> SymbolTable lore -> SymbolTable lore Source #
insertStms :: (ASTLore lore, IndexOp (Op lore), Aliased lore) => Stms lore -> SymbolTable lore -> SymbolTable lore Source #
insertFParams :: ASTLore lore => [FParam lore] -> SymbolTable lore -> SymbolTable lore Source #
insertLParam :: ASTLore lore => LParam lore -> SymbolTable lore -> SymbolTable lore Source #
insertLoopVar :: ASTLore lore => VName -> IntType -> SubExp -> SymbolTable lore -> SymbolTable lore Source #
Misc
hideCertified :: Names -> SymbolTable lore -> SymbolTable lore Source #
Hide these definitions, if they are protected by certificates in the set of names.