Safe Haskell | None |
---|---|
Language | Haskell2010 |
A usage-table is sort of a bottom-up symbol table, describing how (and if) a variable is used.
Synopsis
- data UsageTable
- empty :: UsageTable
- contains :: UsageTable -> [VName] -> Bool
- without :: UsageTable -> [VName] -> UsageTable
- lookup :: VName -> UsageTable -> Maybe Usages
- keys :: UsageTable -> [VName]
- used :: VName -> UsageTable -> Bool
- expand :: (VName -> Names) -> UsageTable -> UsageTable
- isConsumed :: VName -> UsageTable -> Bool
- isInResult :: VName -> UsageTable -> Bool
- isUsedDirectly :: VName -> UsageTable -> Bool
- allConsumed :: UsageTable -> Names
- usages :: Names -> UsageTable
- usage :: VName -> Usages -> UsageTable
- consumedUsage :: VName -> UsageTable
- inResultUsage :: VName -> UsageTable
- data Usages
- leftScope :: UsageTable -> UsageTable
Documentation
data UsageTable Source #
Instances
Eq UsageTable Source # | |
Defined in Futhark.Analysis.UsageTable (==) :: UsageTable -> UsageTable -> Bool # (/=) :: UsageTable -> UsageTable -> Bool # | |
Show UsageTable Source # | |
Defined in Futhark.Analysis.UsageTable showsPrec :: Int -> UsageTable -> ShowS # show :: UsageTable -> String # showList :: [UsageTable] -> ShowS # | |
Semigroup UsageTable Source # | |
Defined in Futhark.Analysis.UsageTable (<>) :: UsageTable -> UsageTable -> UsageTable # sconcat :: NonEmpty UsageTable -> UsageTable # stimes :: Integral b => b -> UsageTable -> UsageTable # | |
Monoid UsageTable Source # | |
Defined in Futhark.Analysis.UsageTable mempty :: UsageTable # mappend :: UsageTable -> UsageTable -> UsageTable # mconcat :: [UsageTable] -> UsageTable # | |
Substitute UsageTable Source # | |
Defined in Futhark.Analysis.UsageTable substituteNames :: Map VName VName -> UsageTable -> UsageTable Source # |
empty :: UsageTable Source #
without :: UsageTable -> [VName] -> UsageTable Source #
keys :: UsageTable -> [VName] Source #
expand :: (VName -> Names) -> UsageTable -> UsageTable Source #
Expand the usage table based on aliasing information.
isConsumed :: VName -> UsageTable -> Bool Source #
isInResult :: VName -> UsageTable -> Bool Source #
isUsedDirectly :: VName -> UsageTable -> Bool Source #
Has the given name been used directly (i.e. could we rename it or remove it without anyone noticing?)
allConsumed :: UsageTable -> Names Source #
usages :: Names -> UsageTable Source #
consumedUsage :: VName -> UsageTable Source #
inResultUsage :: VName -> UsageTable Source #
leftScope :: UsageTable -> UsageTable Source #