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

Copyright(C) 2012-2016, University of Twente
LicenseBSD2 (see the file LICENSE)
MaintainerChristiaan Baaij <christiaan.baaij@gmail.com>
Safe HaskellNone
LanguageHaskell2010

CLaSH.Normalize.Util

Description

Utility functions used by the normalisation transformations

Synopsis

Documentation

alreadyInlined Source

Arguments

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

addNewInline Source

Arguments

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

callGraph Source

Arguments

:: [TmName]

List of functions that should not be inspected

-> HashMap TmName (Type, SrcSpan, Term)

Global binders

-> TmName

Root of the call graph

-> [(TmName, [TmName])] 

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

mkRecursiveComponents 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, SrcSpan, Term)

Original Binders

-> HashMap TmName [TmName]

Dependency Graph

-> [TmName]

Recursive block

-> (TmName, (Type, SrcSpan, 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, SrcSpan, Term)

Original Binders

-> Gr TmName TmName

Recursive block dominator

-> LNode TmName

Recursive block dominator root

-> (TmName, (Type, SrcSpan, Term))

Block sank binder