Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Futhark.Analysis.PrimExp.Table
Contents
Description
Compute a mapping from variables to their corresponding (fully expanded) PrimExps.
Synopsis
- primExpTable :: (PrimExpAnalysis rep, RepTypes rep) => Prog rep -> PrimExpTable
- type PrimExpTable = Map VName (Maybe (PrimExp VName))
- class PrimExpAnalysis rep where
- opPrimExp :: Scope rep -> Op rep -> State PrimExpTable ()
- stmToPrimExps :: forall rep. (PrimExpAnalysis rep, RepTypes rep) => Scope rep -> Stm rep -> State PrimExpTable ()
Documentation
primExpTable :: (PrimExpAnalysis rep, RepTypes rep) => Prog rep -> PrimExpTable Source #
type PrimExpTable = Map VName (Maybe (PrimExp VName)) Source #
Maps variables to maybe PrimExps. Will map to nothing if it cannot be resolved to a PrimExp. For all uses of this analysis atm. a variable can be considered inscrutable if it cannot be resolved to a primexp.
Extensibility
class PrimExpAnalysis rep where Source #
A class for extracting PrimExps from what is inside an op.
Instances
PrimExpAnalysis GPU Source # | |
Defined in Futhark.Analysis.PrimExp.Table | |
PrimExpAnalysis MC Source # | |
Defined in Futhark.Analysis.PrimExp.Table |
Testing
stmToPrimExps :: forall rep. (PrimExpAnalysis rep, RepTypes rep) => Scope rep -> Stm rep -> State PrimExpTable () Source #