Skip to content

Commit 7f1f234

Browse files
authored
Remove unused function (#3950)
Remove unused [Cfg_to_linear.print_assembly]
1 parent d95e9c9 commit 7f1f234

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

backend/cfg/cfg_to_linear.ml

-26
Original file line numberDiff line numberDiff line change
@@ -436,29 +436,3 @@ let run cfg_with_layout =
436436
fun_prologue_required;
437437
fun_section_name
438438
}
439-
440-
let layout_of_block_list : Cfg.basic_block list -> Cfg_with_layout.layout =
441-
fun blocks ->
442-
let res = DLL.make_empty () in
443-
List.iter (fun block -> DLL.add_end res block.Cfg.start) blocks;
444-
res
445-
446-
(** debug print block as assembly *)
447-
let print_assembly (blocks : Cfg.basic_block list) =
448-
(* create a fake cfg just for printing these blocks *)
449-
let layout = layout_of_block_list blocks in
450-
let fun_name = "_fun_start_" in
451-
let cfg =
452-
Cfg.create ~fun_name ~fun_args:[||] ~fun_codegen_options:[]
453-
~fun_dbg:Debuginfo.none ~fun_contains_calls:true
454-
~fun_num_stack_slots:(Stack_class.Tbl.make 0) ~fun_poll:Default_poll
455-
in
456-
List.iter
457-
(fun (block : Cfg.basic_block) ->
458-
Label.Tbl.add cfg.blocks block.start block)
459-
blocks;
460-
let cl = Cfg_with_layout.create cfg ~layout in
461-
let fundecl = run cl in
462-
X86_proc.reset_asm_code ();
463-
Emit.fundecl fundecl;
464-
X86_proc.generate_code (Some (X86_gas.generate_asm !Emitaux.output_channel))

backend/cfg/cfg_to_linear.mli

-2
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,3 @@
2828
[@@@ocaml.warning "+a-40-41-42"]
2929

3030
val run : Cfg_with_layout.t -> Linear.fundecl
31-
32-
val print_assembly : Cfg.basic_block list -> unit

0 commit comments

Comments
 (0)