jon.recoil.org

Module Sub_cfg

val instr_id : InstructionId.sequence

These IDs are also used by make_instr

val reset_instr_id : unit -> unit
val make_instr : 'a -> Reg.t array -> Reg.t array -> Debuginfo.t -> 'a Cfg.instruction

A "sub" CFG is the counterpart of an instruction list in the original Mach selection pass.

It is essentially a collection of blocks (stored as a layout, i.e. as a list), with two designated blocks:

The exit block is where more instructions are being added, which means that the terminator of an in-construction "sub" CFG is `Never`, and will be changed only when no additional instructions will be inserted to the block.

type t
val exit_has_never_terminator : Sub_cfg.t -> bool
val make_empty : unit -> Sub_cfg.t
val add_empty_block_at_start : Sub_cfg.t -> label:Label.t -> unit
val add_never_block : Sub_cfg.t -> label:Label.t -> unit
val add_instruction_at_start : Sub_cfg.t -> Cfg.basic -> Reg.t array -> Reg.t array -> Debuginfo.t -> unit

Use add_instruction in preference to this function.

val add_instruction : Sub_cfg.t -> Cfg.basic -> Reg.t array -> Reg.t array -> Debuginfo.t -> unit

add_instruction can only be called when the terminator is Never.

val add_instruction' : Sub_cfg.t -> Cfg.basic Cfg.instruction -> unit

add_instruction' can only be called when the terminator is Never.

val set_terminator : Sub_cfg.t -> Cfg.terminator -> Reg.t array -> Reg.t array -> Debuginfo.t -> unit

set_terminator can only be called when the terminator is Never.

val iter_basic_blocks : Sub_cfg.t -> f:(Cfg.basic_block -> unit) -> unit
val exists_basic_blocks : Sub_cfg.t -> f:(Cfg.basic_block -> bool) -> bool
val join : from:Sub_cfg.t list -> to_:Sub_cfg.t -> unit
val join_tail : from:Sub_cfg.t list -> to_:Sub_cfg.t -> unit
val update_exit_terminator : ?arg:Reg.t array -> Sub_cfg.t -> Cfg.terminator -> unit
val start_label : Sub_cfg.t -> Label.t
val mark_as_trap_handler : Sub_cfg.t -> unit
val dump : Sub_cfg.t -> unit