DFMonad
Documentation
data DataflowLattice a Source
Constructors
| DataflowLattice | |
Fields
| |
class DataflowAnalysis m whereSource
Methods
Arguments
| :: m f () | Useful for starting a new iteration |
factsStatus :: m f ChangeFlagSource
Arguments
| :: m f a | |
| -> m f a | Do a new analysis and then throw away all the related state. |
getFact :: BlockId -> m f fSource
setFact :: Outputable f => BlockId -> f -> m f ()Source
getExitFact :: m f fSource
setExitFact :: Outputable f => f -> m f ()Source
Arguments
| :: Outputable f | |
| => BlockId | |
| -> f | |
| -> m f () | assert fact already at this val |
forgetFact :: BlockId -> m f ()Source
addLastOutFact :: (BlockId, f) -> m f ()Source
It might be surprising these next two are needed in a pure analysis,
but for some problems we do a shallow rewriting in which a rewritten
graph is not itself considered for further rewriting but merely undergoes
an analysis. In this case the results of a forward analysis might produce
new facts that go on BlockId's that reside outside the graph being analyzed.
Thus these lastOutFacts need to be available even in a pure analysis.
bareLastOutFacts :: m f [(BlockId, f)]Source
forgetLastOutFacts :: m f ()Source
getAllFacts :: m f (BlockEnv f)Source
setAllFacts :: BlockEnv f -> m f ()Source
Instances
| Monad m => DataflowAnalysis (DFM' m) |
runDFM :: Monad m => DataflowLattice f -> DFM' m f a -> m aSource
markGraphRewritten :: Monad m => DFM' m f ()Source
module OptimizationFuel