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

Safe HaskellNone

CLaSH.Normalize.Strategy

Description

Transformation process for normalization

Synopsis

Documentation

normalization :: NormRewriteSource

Normalisation transformation

cleanup :: NormRewriteSource

Simple cleanup transformation, currently only inlines "Wrappers"

representable :: NormRewriteSource

Unsure that functions have representable arguments, results, and let-bindings

simplification :: NormRewriteSource

Brings representable function in the desired normal form:

  • Only top-level lambda's
  • Single Lambda-bound top-level Let-binding, where the body is a variable reference
  • Modified ANF (constants are not let-bound, non-representable arguments to primitives are not let-bound)
  • All let-bindings are representable

doInline :: String -> NormRewrite -> NormRewriteSource

Perform an inlining transformation using a bottomup traversal, and commit inlined function names to the inlining log/cachce

repeatBottomup :: [(String, NormRewrite)] -> NormRewriteSource

Repeatedly apply a set of transformation in a bottom-up traversal