clash-lib-0.5.8: CAES Language for Synchronous Hardware - As a Library

Safe HaskellNone
LanguageHaskell2010

CLaSH.Normalize.Util

Description

Utility functions used by the normalisation transformations

Synopsis

Documentation

alreadyInlined :: TmName -> NormalizeMonad (Maybe Int) Source

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

specializeNorm :: Bool -> 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

callGraph Source

Arguments

:: [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

recursiveComponents Source

Arguments

:: [(TmName, [TmName])]
(calling function,[called function
)]
-> [[TmName]] 

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

lambdaDrop Source

Arguments

:: HashMap TmName (Type, Term)

Original Binders

-> HashMap TmName [TmName]

Dependency Graph

-> [TmName]

Recursive block

-> (TmName, (Type, Term))

Lambda-dropped Binders

dominator Source

Arguments

:: HashMap TmName [TmName]

Dependency Graph

-> [TmName]

Recursive block

-> Gr TmName TmName

Recursive block dominator

blockSink Source

Arguments

:: HashMap TmName (Type, Term)

Original Binders

-> Gr TmName TmName

Recursive block dominator

-> LNode TmName

Recursive block dominator root

-> (TmName, (Type, Term))

Block sank binder