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

Safe HaskellNone
LanguageHaskell2010

CLaSH.Normalize.Types

Description

Types used in Normalize modules

Synopsis

Documentation

data NormalizeState Source

State of the NormalizeMonad

Constructors

NormalizeState 

Fields

_normalized :: HashMap TmName (Type, Term)

Global binders

_specialisationCache :: Map (TmName, Int, Either Term Type) (TmName, Type)

Cache of previously specialised functions:

  • Key: (name of the original function, argument position, specialised term/type)
  • Elem: (name of specialised function,type of specialised function)
_specialisationHistory :: HashMap TmName Int

Cache of how many times a function was specialized

_specialisationLimit :: Int

Number of time a function f can be specialized

_inlineHistory :: HashMap TmName (HashMap TmName Int)

Cache of function where inlining took place:

  • Key: function where inlining took place
  • Elem: (functions which were inlined, number of times inlined)
_inlineLimit :: Int

Number of times a function f can be inlined in a function g

_curFun :: TmName

Function which is currently normalized

type NormalizeMonad = State NormalizeState Source

State monad that stores specialisation and inlining information

type NormalizeSession = RewriteSession NormalizeMonad Source

RewriteSession with extra Normalisation information

type NormRewrite = Rewrite NormalizeMonad Source

A Transform action in the context of the RewriteMonad and NormalizeMonad