Module Cfg_with_layout
type layout = Label.t Oxcaml_utils.Doubly_linked_list.tval add_block : t -> Cfg.basic_block -> after:Label.t -> unitAdd to cfg, layout, and other data-structures that track labels.
val remove_blocks : t -> Label.Set.t -> unitRemove from cfg, layout, and other data-structures that track labels.
val save_as_dot :
?show_instr:bool ->
?show_exn:bool ->
?annotate_instr:
(Format.formatter ->
[ `Basic of Cfg.basic Cfg.instruction
| `Terminator of Cfg.terminator Cfg.instruction ] ->
unit)
list ->
?annotate_block:(Label.t -> string) ->
?annotate_block_end:(Format.formatter -> Cfg.basic_block -> unit) ->
?annotate_succ:(Label.t -> Label.t -> string) ->
?filename:string ->
t ->
string ->
unitval print_dot :
?show_instr:bool ->
?show_exn:bool ->
?annotate_instr:
(Format.formatter ->
[ `Basic of Cfg.basic Cfg.instruction
| `Terminator of Cfg.terminator Cfg.instruction ] ->
unit)
list ->
?annotate_block:(Label.t -> string) ->
?annotate_block_end:(Format.formatter -> Cfg.basic_block -> unit) ->
?annotate_succ:(Label.t -> Label.t -> string) ->
Format.formatter ->
t ->
unitval reorder_blocks_random : ?random_state:Random.State.t -> t -> unitChange layout: randomly reorder the blocks, keeping the entry block first. This function is intended for testing and enabled by compiler flag "-reorder-blocks-random".
Side-effects random_state by repeated calls to Random.State.int and Random.State.bool.
val iter_blocks : t -> f:(Cfg.basic_block -> unit) -> unitval iter_instructions :
t ->
instruction:(Cfg.basic Cfg.instruction -> unit) ->
terminator:(Cfg.terminator Cfg.instruction -> unit) ->
unitval fold_instructions :
t ->
instruction:('a -> Cfg.basic Cfg.instruction -> 'a) ->
terminator:('a -> Cfg.terminator Cfg.instruction -> 'a) ->
init:'a ->
'aval insert_block :
t ->
Cfg.basic_instruction_list ->
after:Cfg.basic_block ->
before:Cfg.basic_block option ->
Cfg.basic_block list