Skip to content

Remove unused function #3950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions backend/cfg/cfg_to_linear.ml
Original file line number Diff line number Diff line change
Expand Up @@ -436,29 +436,3 @@ let run cfg_with_layout =
fun_prologue_required;
fun_section_name
}

let layout_of_block_list : Cfg.basic_block list -> Cfg_with_layout.layout =
fun blocks ->
let res = DLL.make_empty () in
List.iter (fun block -> DLL.add_end res block.Cfg.start) blocks;
res

(** debug print block as assembly *)
let print_assembly (blocks : Cfg.basic_block list) =
(* create a fake cfg just for printing these blocks *)
let layout = layout_of_block_list blocks in
let fun_name = "_fun_start_" in
let cfg =
Cfg.create ~fun_name ~fun_args:[||] ~fun_codegen_options:[]
~fun_dbg:Debuginfo.none ~fun_contains_calls:true
~fun_num_stack_slots:(Stack_class.Tbl.make 0) ~fun_poll:Default_poll
in
List.iter
(fun (block : Cfg.basic_block) ->
Label.Tbl.add cfg.blocks block.start block)
blocks;
let cl = Cfg_with_layout.create cfg ~layout in
let fundecl = run cl in
X86_proc.reset_asm_code ();
Emit.fundecl fundecl;
X86_proc.generate_code (Some (X86_gas.generate_asm !Emitaux.output_channel))
2 changes: 0 additions & 2 deletions backend/cfg/cfg_to_linear.mli
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@
[@@@ocaml.warning "+a-40-41-42"]

val run : Cfg_with_layout.t -> Linear.fundecl

val print_assembly : Cfg.basic_block list -> unit
Loading