jon.recoil.org

Module Cfg_with_infos

type t

Holds a Cfg_with_layout.t value, and "caches" for:

  • the liveness information;
  • the dominators information;
  • the loop information.

Each cache can be invalidated, and should be when modification of the underlying CFG would cause the cached information to become invalid.

Typically, any structural change to the graph, or change to the `arg` and `res` field of the instrutions is likely to result in a different liveness information, but only structural changes to the graph would affect dominators and loop information.

val cfg_with_layout : Cfg_with_infos.t -> Cfg_with_layout.t
val cfg : Cfg_with_infos.t -> Cfg.t
val fold_blocks : Cfg_with_infos.t -> f:(Label.t -> Cfg.basic_block -> 'a -> 'a) -> init:'a -> 'a
val fold_body_instructions : Cfg_with_infos.t -> f:('a -> Cfg.basic Cfg.instruction -> 'a) -> init:'a -> 'a
val get_block_exn : Cfg_with_infos.t -> Label.t -> Cfg.basic_block
val invalidate_liveness : Cfg_with_infos.t -> unit
val invalidate_loop_infos : Cfg_with_infos.t -> unit
val invalidate_dominators_and_loop_infos : Cfg_with_infos.t -> unit