Js_of_ocaml_compiler.Structureval get_edges : graph -> Code.Addr.t -> Js_of_ocaml_compiler.Code.Addr.Set.tval is_backward : t -> Code.Addr.t -> Code.Addr.t -> boolval is_forward : t -> Code.Addr.t -> Code.Addr.t -> boolval build_graph :
Code.block Js_of_ocaml_compiler.Code.Addr.Map.t ->
Code.Addr.t ->
tval control_flow_graph :
Code.block Js_of_ocaml_compiler.Code.Addr.Map.t ->
Code.Addr.t ->
tThe control flow graph of a function, without the edges build_graph adds to limit the scope of loops and exception handlers
val immediate_dominators :
t ->
Code.Addr.t Js_of_ocaml_compiler.Code.Addr.Hashtbl.tThe immediate dominator of each block, except the entry block
val dominance_frontier :
t ->
Code.Addr.t Js_of_ocaml_compiler.Code.Addr.Hashtbl.t ->
graphdominance_frontier g idom computes the dominance frontier of each block, given the immediate dominators idom of graph g
val is_merge_node : t -> Code.Addr.t -> boolval is_loop_header : t -> Code.Addr.t -> boolval sort_in_post_order : t -> Code.Addr.t list -> Code.Addr.t listval blocks_in_reverse_post_order : t -> Code.Addr.t listval get_nodes : t -> Js_of_ocaml_compiler.Code.Addr.Set.tval norm : Code.program -> Code.programnorm p normalizes a program p to accommodate Structure.build_graph logic. In practice, it ensures that all loops have a predecessor block and allows to exit loops early.