Module Sub_cfg
val instr_id : InstructionId.sequenceThese IDs are also used by make_instr
val make_instr :
'a ->
Reg.t array ->
Reg.t array ->
Debuginfo.t ->
'a Cfg.instructionA "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:
- an entry block;
- an exit block.
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.
val exit_has_never_terminator : t -> boolval make_empty : unit -> tval add_instruction_at_start :
t ->
Cfg.basic ->
Reg.t array ->
Reg.t array ->
Debuginfo.t ->
unitUse add_instruction in preference to this function.
val add_instruction :
t ->
Cfg.basic ->
Reg.t array ->
Reg.t array ->
Debuginfo.t ->
unitadd_instruction can only be called when the terminator is Never.
val add_instruction' : t -> Cfg.basic Cfg.instruction -> unitadd_instruction' can only be called when the terminator is Never.
val set_terminator :
t ->
Cfg.terminator ->
Reg.t array ->
Reg.t array ->
Debuginfo.t ->
unitset_terminator can only be called when the terminator is Never.
val iter_basic_blocks : t -> f:(Cfg.basic_block -> unit) -> unitval exists_basic_blocks : t -> f:(Cfg.basic_block -> bool) -> boolval update_exit_terminator : ?arg:Reg.t array -> t -> Cfg.terminator -> unitval mark_as_trap_handler : t -> unitval dump : t -> unit