diff options
Diffstat (limited to 'src/jib/jib_compile.ml')
| -rw-r--r-- | src/jib/jib_compile.ml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/jib/jib_compile.ml b/src/jib/jib_compile.ml index 27f833d8..facf64e9 100644 --- a/src/jib/jib_compile.ml +++ b/src/jib/jib_compile.ml @@ -1179,10 +1179,15 @@ and compile_def' n total ctx = function if !opt_debug_flow_graphs then begin let instrs = Jib_optimize.(instrs |> optimize_unit |> flatten_instrs) in + let root, _, cfg = Jib_ssa.control_flow_graph instrs in + let idom = Jib_ssa.immediate_dominators cfg root in let cfg = Jib_ssa.ssa instrs in let out_chan = open_out (Util.zencode_string (string_of_id id) ^ ".gv") in Jib_ssa.make_dot out_chan cfg; close_out out_chan; + let out_chan = open_out (Util.zencode_string (string_of_id id) ^ ".dom.gv") in + Jib_ssa.make_dominators_dot out_chan idom cfg; + close_out out_chan; end; [CDEF_fundef (id, None, List.map fst compiled_args, instrs)], orig_ctx |
