1. Overview
  2. Docs
Module type
Class type

The module Key corresponds to the identifiers that define the ranges in Linearize instructions. Each instruction should have two sets of keys, available_before and available_across, with accessor functions of these names being provided to retrieve them. The notion of "availability" is not prescribed. The availability sets are used to compute subranges associated to each key.

type t

The type of identifiers that define ranges.

module Set : sig ... end
module Map : Map.S with type key = t
val print : Format.formatter -> t -> unit

Print a representation (typically sexp) of the given key to the given formatter.

val all_parents : t -> t list

In some situations, for performance reasons, an "available" set may only contain a subset of all keys that need to be tracked. For example, when using a notion of availability that describes which lexical block a given instruction lies in, using a standard notion of nested lexical blocks, the innermost lexical block uniquely determines the chain of its parents. (This is exploited in Lexical_block_ranges.) The all_parents function must return, given an "available" key, all those other keys that are also available and uniquely determined by key.