Module Cmm
type machtype = machtype_component arrayval typ_void : machtypeval typ_val : machtypeval typ_addr : machtypeval typ_int : machtypeval typ_float : machtypeval typ_float32 : machtypeval typ_vec128 : machtypeval typ_vec256 : machtypeval typ_vec512 : machtypeval typ_int128 : machtypeval lub_component :
machtype_component ->
machtype_component ->
machtype_componentLeast upper bound of two machtype_components.
val ge_component : machtype_component -> machtype_component -> boolReturns true iff the first supplied machtype_component is greater than or equal to the second under the relation used by lub_component.
type exttype = | XInt(*r OCaml value, word-sized integer
*)| XInt8(*r 8-bit integer
*)| XInt16(*r 16-bit integer
*)| XInt32(*r 32-bit integer
*)| XInt64(*r 64-bit integer
*)| XFloat32(*r single-precision FP number
*)| XFloat(*r double-precision FP number
*)| XVec128(*r 128-bit vector
*)| XVec256(*r 256-bit vector
*)| XVec512(*r 512-bit vector
*)
A variant of machtype used to describe arguments to external C functions
val equal_stack_align : stack_align -> stack_align -> booltype integer_comparison = Scalar.Integer_comparison.t = val negate_integer_comparison : integer_comparison -> integer_comparisonval swap_integer_comparison : integer_comparison -> integer_comparisontype float_comparison = Scalar.Float_comparison.t = val negate_float_comparison : float_comparison -> float_comparisonval swap_float_comparison : float_comparison -> float_comparisontype label = Label.tval new_label : unit -> labelval set_label : label -> unitval cur_label : unit -> labelval equal_atomic_bitwidth : atomic_bitwidth -> atomic_bitwidth -> booltype phantom_defining_expr = | Cphantom_const_int of Targetint.t(*The phantom-let-bound variable is a constant integer. The argument must be the tagged representation of an integer within the range of type
*)inton the target. (Analogously toCconst_int.)| Cphantom_const_symbol of string(*The phantom-let-bound variable is an alias for a symbol.
*)| Cphantom_var of Backend_var.t(*The phantom-let-bound variable is an alias for another variable. The aliased variable must not be a bound by a phantom let.
*)| Cphantom_offset_var of {var : Backend_var.t;offset_in_words : int;
}(*The phantom-let-bound-variable's value is defined by adding the given number of words to the pointer contained in the given identifier.
*)| Cphantom_read_field of {var : Backend_var.t;field : int;
}(*The phantom-let-bound-variable's value is found by adding the given number of words to the pointer contained in the given identifier, then dereferencing.
*)| Cphantom_read_symbol_field of {}(*As for
*)Uphantom_read_var_field, but with the pointer specified by a symbol.| Cphantom_block of {tag : int;fields : Backend_var.t list;
}(*The phantom-let-bound variable points at a block with the given structure.
*)
type trap_action = | Push of trywith_shared_label(*Add the corresponding handler to the trap stack.
*)| Pop of trywith_shared_label(*Remove the last handler from the trap stack.
*)
type memory_chunk = | Byte_unsigned| Byte_signed| Sixteen_unsigned| Sixteen_signed| Thirtytwo_unsigned| Thirtytwo_signed| Word_int| Word_val| Single of {reg : float_width;
}| Double| Onetwentyeight_unaligned| Onetwentyeight_aligned| Twofiftysix_unaligned| Twofiftysix_aligned| Fivetwelve_unaligned| Fivetwelve_aligned
val size_of_memory_chunk : memory_chunk -> intSize in bytes of a memory access for the given chunk type.
type reinterpret_cast = | Int_of_value| Value_of_int| Float_of_float32| Float32_of_float| Float_of_int64| Int64_of_float| Float32_of_int32| Int32_of_float32| V128_of_vec of vector_width| V256_of_vec of vector_width| V512_of_vec of vector_width
type static_cast = | Float_of_int of float_width| Int_of_float of float_width| Float_of_float32| Float32_of_float| V128_of_scalar of vec128_type| Scalar_of_v128 of vec128_type| V256_of_scalar of vec256_type| Scalar_of_v256 of vec256_type| V512_of_scalar of vec512_type| Scalar_of_v512 of vec512_type
module Alloc_mode : sig ... endtype alloc_block_kind = | Alloc_block_kind_other| Alloc_block_kind_closure| Alloc_block_kind_float| Alloc_block_kind_float32| Alloc_block_kind_vec128| Alloc_block_kind_vec256| Alloc_block_kind_vec512| Alloc_block_kind_boxed_int of Primitive.boxed_integer| Alloc_block_kind_float_array| Alloc_block_kind_float32_u_array| Alloc_block_kind_int_u_array| Alloc_block_kind_int8_u_array| Alloc_block_kind_int16_u_array| Alloc_block_kind_int32_u_array| Alloc_block_kind_int64_u_array| Alloc_block_kind_vec128_u_array| Alloc_block_kind_vec256_u_array| Alloc_block_kind_vec512_u_array
val equal_alloc_block_kind : alloc_block_kind -> alloc_block_kind -> booltype alloc_dbginfo_item = {alloc_words : int;alloc_block_kind : alloc_block_kind;alloc_dbg : Debuginfo.t;
}Due to Comballoc, a single Ialloc instruction may combine several unrelated allocations. Their Debuginfo.t (which may differ) are stored as a list of alloc_dbginfo. This list is in order of increasing memory address, which is the reverse of the original allocation order. Later allocations are consed to the front of this list by Comballoc.
val equal_alloc_dbginfo_item : alloc_dbginfo_item -> alloc_dbginfo_item -> booltype alloc_dbginfo = alloc_dbginfo_item listval equal_alloc_dbginfo : alloc_dbginfo -> alloc_dbginfo -> booltype operation = | Capply of {result_type : machtype;region : Lambda.region_close;callees : symbol list option;
}| Cextcall of {func : string;ty : machtype;ty_args : exttype list;alloc : bool;builtin : bool;returns : bool;effects : effects;coeffects : coeffects;
}(*The
*)machtypeis the machine type of the result. Theexttype listdescribes the unboxing types of the arguments. An empty list means "all arguments are machine wordsXInt". The boolean indicates whether the function may allocate.| Cload of {memory_chunk : memory_chunk;mutability : Asttypes.mutable_flag;is_atomic : bool;
}| Calloc of Alloc_mode.t * alloc_block_kind| Cstore of memory_chunk * initialization_or_assignment| Caddi| Csubi| Cmuli| Cmulhi of {}| Cdivi| Cmodi| Caddi128| Csubi128| Cmuli64 of {}| Cand| Cor| Cxor| Clsl| Clsr| Casr| Cbswap of {bitwidth : bswap_bitwidth;
}| Ccsel of machtype| Cclz| Cctz| Cpopcnt| Cprefetch of {is_write : bool;locality : prefetch_temporal_locality_hint;
}| Catomic of {op : atomic_op;size : atomic_bitwidth;
}| Ccmpi of integer_comparison| Caddv| Cadda| Cnegf of float_width| Cabsf of float_width| Caddf of float_width| Csubf of float_width| Cmulf of float_width| Cdivf of float_width| Cpackf32| Creinterpret_cast of reinterpret_cast| Cstatic_cast of static_cast| Ccmpf of float_width * float_comparison| Craise of Lambda.raise_kind| Cprobe of {}| Cprobe_is_enabled of {}| Copaque| Cbeginregion| Cendregion| Ctuple_field of int * machtype array| Cdls_get| Ctls_get| Cdomain_index| Cpoll| Cpause
val global_symbol : string -> symboltype static_handler = {label : Lambda.static_label;params : (Backend_var.With_provenance.t * machtype) list;body : expression;dbg : Debuginfo.t;is_cold : bool;
}Every basic block should have a corresponding Debuginfo.t for its beginning.
and expression = | Cconst_int of int * Debuginfo.t| Cconst_natint of nativeint * Debuginfo.t| Cconst_float32 of float * Debuginfo.t| Cconst_float of float * Debuginfo.t| Cconst_vec128 of vec128_bits * Debuginfo.t| Cconst_vec256 of vec256_bits * Debuginfo.t| Cconst_vec512 of vec512_bits * Debuginfo.t| Cconst_symbol of symbol * Debuginfo.t| Cvar of Backend_var.t| Clet of Backend_var.With_provenance.t * expression * expression| Cphantom_let of Backend_var.With_provenance.t * phantom_defining_expr option * expression| Ctuple of expression list| Cop of operation * expression list * Debuginfo.t| Csequence of expression * expression| Cifthenelse of expression * Debuginfo.t * expression * Debuginfo.t * expression * Debuginfo.t| Cswitch of expression * int array * (expression * Debuginfo.t) array * Debuginfo.t| Ccatch of ccatch_flag * static_handler list * expression| Cexit of exit_label * expression list * trap_action list| Cinvalid of {message : string;symbol : symbol;
}
type codegen_option = | Reduce_code_size| No_CSE| Use_linscan_regalloc| Use_regalloc of Clflags.Register_allocator.t| Use_regalloc_param of string list| Cold| Assume_zero_alloc of {strict : bool;never_returns_normally : bool;never_raises : bool;loc : Location.t;
}| Check_zero_alloc of {strict : bool;loc : Location.t;custom_error_msg : string option;
}
type fundecl = {fun_name : symbol;fun_args : (Backend_var.With_provenance.t * machtype) list;fun_body : expression;fun_codegen_options : codegen_option list;fun_poll : Lambda.poll_attribute;fun_dbg : Debuginfo.t;fun_ret_type : machtype;
}type data_item = | Cdefine_symbol of symbol| Cint8 of int| Cint16 of int| Cint32 of nativeint| Cint of nativeint| Csingle of float| Cdouble of float| Cvec128 of vec128_bits| Cvec256 of vec256_bits| Cvec512 of vec512_bits| Csymbol_address of symbol| Csymbol_offset of symbol * int| Cstring of string| Cskip of int| Calign of int
When data items that are less than 64 bits wide occur in blocks, whose fields are 64-bits wide, the following rules apply:
- For int32, the value is sign extended.
- For float32, the value is zero extended. It is ok to rely on zero-initialization of the data section to achieve this.
val ccatch :
(Lambda.static_label
* (Backend_var.With_provenance.t * machtype) list
* expression
* expression
* Debuginfo.t
* bool) ->
expressionval ctrywith :
(expression
* trywith_shared_label
* Backend_var.With_provenance.t
* (Backend_var.With_provenance.t * machtype) list
* expression
* Debuginfo.t) ->
expressionval iter_shallow_tail : (expression -> unit) -> expression -> boolEither apply the callback to all immediate sub-expressions that can produce the final result for the expression and return true, or do nothing and return false. Note that the notion of "tail" sub-expression used here does not match the one used to trigger tail calls; in particular, try...with handlers are considered to be in tail position (because their result become the final result for the expression).
val map_shallow_tail : (expression -> expression) -> expression -> expressionApply the transformation to those immediate sub-expressions of an expression that are in tail position, using the same definition of "tail" as iter_shallow_tail
val map_tail : (expression -> expression) -> expression -> expressionApply the transformation to an expression, trying to push it to all inner sub-expressions that can produce the final result, by recursively applying map_shallow_tail
val iter_shallow : (expression -> unit) -> expression -> unitApply the callback to each immediate sub-expression.
val map_shallow : (expression -> expression) -> expression -> expressionApply the transformation to each immediate sub-expression.
val compare_machtype_component :
machtype_component ->
machtype_component ->
intval equal_machtype_component : machtype_component -> machtype_component -> boolval equal_static_cast : static_cast -> static_cast -> boolval equal_reinterpret_cast : reinterpret_cast -> reinterpret_cast -> boolval equal_float_width : float_width -> float_width -> boolval equal_float_comparison : float_comparison -> float_comparison -> boolval equal_memory_chunk : memory_chunk -> memory_chunk -> boolval equal_integer_comparison : integer_comparison -> integer_comparison -> boolval is_val : machtype_component -> boolval is_int : machtype_component -> boolval is_addr : machtype_component -> boolval is_exn_handler : ccatch_flag -> boolval equal_exit_label : exit_label -> exit_label -> bool