jon.recoil.org

Module Flambda2_simplify.Common_subexpression_elimination

Maintenance of environments and associated calculations for common subexpression elimination, performed during Simplify.

module T = Flambda2_types
type t

If the t already has an equation for the given primitive, then add does nothing. (Expected usage is that this will correspond to outermost bindings taking precedence, but for simplicity, this function does not enforce that.)

module Join_result : sig ... end
val join : typing_env_at_fork:TE.t -> cse_at_fork:Flambda2_simplify.Common_subexpression_elimination.t -> use_info:'a list -> get_typing_env:('a -> TE.t) -> get_rewrite_id:('a -> RI.t) -> get_cse:('a -> Flambda2_simplify.Common_subexpression_elimination.t) -> params:Flambda2_bound_identifiers.Bound_parameters.t -> Flambda2_simplify.Common_subexpression_elimination.Join_result.t option

join adds CSE equations into cse_at_fork at the next scope level after that given by the typing_env_at_fork.