jon.recoil.org

Module Flambda2_to_cmm.To_cmm_shared

Helper functions and values for Flambda 2 to Cmm translation. Functions in this module, unlike the ones in Cmm_helpers, depend on Flambda 2 data types.

val remove_skipped_args : 'a list -> _ To_cmm_env.param_type list -> 'a list
val remove_var_opt_with_provenance : To_cmm_env.free_vars -> Backend_var.With_provenance.t option -> To_cmm_env.free_vars
val remove_vars_with_machtype : To_cmm_env.free_vars -> (Backend_var.With_provenance.t * _) list -> To_cmm_env.free_vars
val machtype_of_kinded_parameter : Flambda2_bound_identifiers.Bound_parameter.t -> Cmm.machtype

Create a constant int expression from a targetint.

val nativeint_of_targetint : Flambda2_numbers.Targetint_32_64.t -> Nativeint.t

This does not inline effectful expressions.

val simple : ?consider_inlining_effectful_expressions:bool -> dbg:Debuginfo.t -> To_cmm_env.t -> To_cmm_result.t -> Flambda2_term_basics.Simple.t -> To_cmm_env.translation_result

The default behaviour is to use Flambda_features.Expert.inline_effects_in_cmm, which defaults to false if no command-line flag is given.

val simple_static : To_cmm_result.t -> Flambda2_term_basics.Simple.t -> [> `Static_data of Cmm.data_item list | `Var of Flambda2_identifiers.Variable.t ]

This function translates the Simple at the head of the list first. Regarding consider_inlining_effectful_expressions, see simple above.

val invalid : To_cmm_result.t -> message:string -> Cmm.expression * To_cmm_result.t
module Update_kind : sig ... end

Make an update to a statically-allocated block.

val check_arity : _ Flambda2_kinds.Flambda_arity.t -> _ list -> bool
val extended_machtype_of_return_arity : [ `Unarized ] Flambda2_kinds.Flambda_arity.t -> Cmm_helpers.Extended_machtype.t
val alloc_mode_for_applications_to_cmx : Flambda2_bound_identifiers.Alloc_mode.For_applications.t -> Cmx_format.alloc_mode