ddc-core-simpl-0.4.1.2: 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

infoInspected :: !Int

Number of bindings inspected.

infoSubsts :: !Int

Number of trivial v1 = v2 bindings inlined.

infoBindings :: !Int

Number of bindings floated forwards.

data FloatControl Source

Fine control over what should be floated.

Constructors

FloatAllow

Allow binding to be floated, but don't require it.

FloatDeny

Prevent a binding being floated, at all times.

FloatForce

Force a binding to be floated, at all times.

data Config a n Source

forwardModuleSource

Arguments

:: Ord n 
=> Profile n

Language profile

-> Config a n 
-> Module a n 
-> TransformResult (Module a n) 

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

forwardXSource

Arguments

:: Ord n 
=> Profile n

Language profile.

-> Config a n 
-> Exp a n 
-> TransformResult (Exp a n) 

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