Copyright | (C) 2012-2016, University of Twente |
---|---|

License | BSD2 (see the file LICENSE) |

Maintainer | Christiaan Baaij <christiaan.baaij@gmail.com> |

Safe Haskell | None |

Language | Haskell2010 |

Utility functions used by the normalisation transformations

- alreadyInlined :: TmName -> TmName -> NormalizeMonad (Maybe Int)
- addNewInline :: TmName -> TmName -> NormalizeMonad ()
- specializeNorm :: NormRewrite
- isClosed :: (Functor m, Fresh m) => HashMap TyConName TyCon -> Term -> m Bool
- isConstant :: Term -> Bool
- callGraph :: [TmName] -> HashMap TmName (Type, Term) -> TmName -> [(TmName, [TmName])]
- recursiveComponents :: [(TmName, [TmName])] -> [[TmName]]
- lambdaDropPrep :: HashMap TmName (Type, Term) -> TmName -> HashMap TmName (Type, Term)
- lambdaDrop :: HashMap TmName (Type, Term) -> HashMap TmName [TmName] -> [TmName] -> (TmName, (Type, Term))
- dominator :: HashMap TmName [TmName] -> [TmName] -> Gr TmName TmName
- blockSink :: HashMap TmName (Type, Term) -> Gr TmName TmName -> LNode TmName -> (TmName, (Type, Term))

# Documentation

:: TmName | Function we want to inline |

-> TmName | Function in which we want to perform the inlining |

-> NormalizeMonad (Maybe Int) |

Determine if a function is already inlined in the context of the `NetlistMonad`

:: TmName | Function we want to inline |

-> TmName | Function in which we want to perform the inlining |

-> NormalizeMonad () |

specializeNorm :: NormRewrite Source

Specialize under the Normalization Monad

isClosed :: (Functor m, Fresh m) => HashMap TyConName TyCon -> Term -> m Bool Source

Determine if a term is closed

isConstant :: Term -> Bool Source

Determine if a term represents a constant

:: [TmName] | List of functions that should not be inspected |

-> HashMap TmName (Type, Term) | Global binders |

-> TmName | Root of the call graph |

-> [(TmName, [TmName])] |

Create a call graph for a set of global binders, given a root

Determine the sets of recursive components given the edges of a callgraph