Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data SymbolTable lore
- empty :: SymbolTable lore
- fromScope :: Attributes lore => Scope lore -> SymbolTable lore
- toScope :: SymbolTable lore -> Scope lore
- data Entry lore
- deepen :: SymbolTable lore -> SymbolTable lore
- bindingDepth :: Entry lore -> Int
- valueRange :: Entry lore -> ScalExpRange
- entryStm :: Entry lore -> Maybe (Stm lore)
- entryLetBoundAttr :: Entry lore -> Maybe (LetAttr lore)
- entryType :: Attributes lore => Entry lore -> Type
- asScalExp :: Entry lore -> Maybe ScalExp
- 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 :: Attributes lore => VName -> SymbolTable lore -> Maybe Type
- lookupSubExp :: VName -> SymbolTable lore -> Maybe (SubExp, Certificates)
- lookupScalExp :: Attributes lore => VName -> SymbolTable lore -> Maybe ScalExp
- lookupAliases :: VName -> SymbolTable lore -> Names
- available :: VName -> SymbolTable lore -> Bool
- consume :: Attributes lore => VName -> SymbolTable lore -> SymbolTable lore
- index :: Attributes 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
- indexOp :: (Attributes lore, IndexOp (Op lore)) => SymbolTable lore -> Int -> op -> [PrimExp VName] -> Maybe Indexed
- insertStm :: (IndexOp (Op lore), Ranged lore, Aliased lore) => Stm lore -> SymbolTable lore -> SymbolTable lore
- insertStms :: (IndexOp (Op lore), Ranged lore, Aliased lore) => Stms lore -> SymbolTable lore -> SymbolTable lore
- insertFParams :: Attributes lore => [FParam lore] -> SymbolTable lore -> SymbolTable lore
- insertLParam :: Attributes lore => LParam lore -> SymbolTable lore -> SymbolTable lore
- insertArrayLParam :: Attributes lore => LParam lore -> Maybe VName -> SymbolTable lore -> SymbolTable lore
- insertLoopVar :: Attributes lore => VName -> IntType -> SubExp -> SymbolTable lore -> SymbolTable lore
- updateBounds :: Attributes lore => Bool -> SubExp -> SymbolTable lore -> SymbolTable lore
- setUpperBound :: VName -> ScalExp -> SymbolTable lore -> SymbolTable lore
- setLowerBound :: VName -> ScalExp -> SymbolTable lore -> SymbolTable lore
- isAtLeast :: VName -> Int -> SymbolTable lore -> SymbolTable lore
- rangesRep :: SymbolTable lore -> RangesRep
- hideIf :: (Entry lore -> Bool) -> 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 #
fromScope :: Attributes lore => Scope lore -> SymbolTable lore Source #
toScope :: SymbolTable lore -> Scope lore Source #
Entries
deepen :: SymbolTable lore -> SymbolTable lore Source #
bindingDepth :: Entry lore -> Int Source #
valueRange :: Entry lore -> ScalExpRange Source #
Lookup
lookupExp :: VName -> SymbolTable lore -> Maybe (Exp lore, Certificates) Source #
lookupBasicOp :: VName -> SymbolTable lore -> Maybe (BasicOp, Certificates) Source #
lookupType :: Attributes lore => VName -> SymbolTable lore -> Maybe Type Source #
lookupSubExp :: VName -> SymbolTable lore -> Maybe (SubExp, Certificates) Source #
lookupScalExp :: Attributes lore => VName -> SymbolTable lore -> Maybe ScalExp Source #
lookupAliases :: VName -> SymbolTable lore -> Names Source #
consume :: Attributes lore => VName -> SymbolTable lore -> SymbolTable lore Source #
index :: Attributes lore => VName -> [SubExp] -> SymbolTable lore -> Maybe Indexed 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 :: (Attributes lore, IndexOp (Op lore)) => SymbolTable lore -> Int -> op -> [PrimExp VName] -> Maybe Indexed Source #
Instances
IndexOp () Source # | |
Defined in Futhark.Analysis.SymbolTable | |
Annotations lore => IndexOp (SOAC lore) Source # | |
Defined in Futhark.Representation.SOACS.SOAC | |
IndexOp inner => IndexOp (MemOp inner) Source # | |
Defined in Futhark.Representation.Mem | |
Attributes lore => IndexOp (SegOp lvl lore) Source # | |
Defined in Futhark.Representation.SegOp | |
(Attributes lore, IndexOp op) => IndexOp (HostOp lore op) Source # | |
Defined in Futhark.Representation.Kernels.Kernel |
Insertion
insertStm :: (IndexOp (Op lore), Ranged lore, Aliased lore) => Stm lore -> SymbolTable lore -> SymbolTable lore Source #
insertStms :: (IndexOp (Op lore), Ranged lore, Aliased lore) => Stms 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 #
insertArrayLParam :: Attributes lore => LParam lore -> Maybe VName -> SymbolTable lore -> SymbolTable lore Source #
insertLoopVar :: Attributes lore => VName -> IntType -> SubExp -> SymbolTable lore -> SymbolTable lore Source #
Bounds
updateBounds :: Attributes lore => Bool -> SubExp -> SymbolTable lore -> SymbolTable lore Source #
setUpperBound :: VName -> ScalExp -> SymbolTable lore -> SymbolTable lore Source #
setLowerBound :: VName -> ScalExp -> SymbolTable lore -> SymbolTable lore Source #
isAtLeast :: VName -> Int -> SymbolTable lore -> SymbolTable lore Source #
Misc
rangesRep :: SymbolTable lore -> RangesRep Source #
hideIf :: (Entry lore -> Bool) -> SymbolTable lore -> SymbolTable lore Source #
Hide definitions of those entries that satisfy some predicate.
hideCertified :: Names -> SymbolTable lore -> SymbolTable lore Source #
Hide these definitions, if they are protected by certificates in the set of names.