package ocaml-base-compiler

  1. Overview
  2. Docs
type allocation_point =
  1. | Symbol of Symbol.t
  2. | Variable of Variable.t
type allocated_const =
  1. | Normal of Allocated_const.t
  2. | Array of Lambda.array_kind * Asttypes.mutable_flag * Variable.t list
  3. | Duplicate_array of Lambda.array_kind * Asttypes.mutable_flag * Variable.t
type constant_defining_value =
  1. | Allocated_const of allocated_const
  2. | Block of Tag.t * Variable.t list
  3. | Set_of_closures of Flambda.set_of_closures
  4. | Project_closure of Flambda.project_closure
  5. | Move_within_set_of_closures of Flambda.move_within_set_of_closures
  6. | Project_var of Flambda.project_var
  7. | Field of Variable.t * int
  8. | Symbol_field of Symbol.t * int
  9. | Const of Flambda.const
  10. | Symbol of Symbol.t
  11. | Variable of Variable.t
type initialize_symbol_field = Variable.t option

Simple alias analysis working over information about which symbols have been assigned to variables; and which constants have been assigned to symbols. The return value gives the assignment of the defining values of constants to variables. Also see comments for Lift_constants, whose input feeds this pass.

Variables found to be ill-typed accesses to other constants, for example arising from dead code, will be pointed at the_dead_constant.

val print_constant_defining_value : Format.formatter -> constant_defining_value -> unit
OCaml

Innovation. Community. Security.