ddc-core-simpl-0.3.1.1: Disciplined Disciple Compiler code transformations.

Safe HaskellNone

DDC.Core.Transform.Forward

Description

Float let-bindings with a single use forward into their use-sites.

Synopsis

Documentation

data ForwardInfo Source

Summary of number of bindings floated.

Constructors

ForwardInfo 

Fields

infoSubsts :: Int

Number of trivial v1 = v2 bindings inlined.

infoBindings :: Int

Number of bindings floated forwards.

forwardModule :: Ord n => Profile n -> Module a n -> Module a nSource

Float let-bindings in a module with a single use forward into their use sites.

forwardX :: Ord n => Profile n -> Exp a n -> TransformResult (Exp a n)Source

Float let-bindings in an expression with a single use forward into their use-sites.