Skip to content

Commit

Permalink
Cleanup dead code in the gccjit backend
Browse files Browse the repository at this point in the history
  • Loading branch information
lukstafi committed Oct 11, 2024
1 parent 0f0336b commit e866289
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
9 changes: 1 addition & 8 deletions arrayjit/lib/gcc_backend.gccjit.ml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ let init ~label =

type tn_info = {
tn : Tn.t; (** The original array. *)
mutable ptr : (Gccjit.rvalue[@sexp.opaque]) Lazy.t;
ptr : (Gccjit.rvalue[@sexp.opaque]) Lazy.t;
(** Pointer to the first value of the associated array.
- if [mem = Constant_from_host], the pointer to the first element of the hosted [Ndarray],
- if [mem = From_context], either a pointer to [Ndarray] from [context.arrays] when
Expand Down Expand Up @@ -130,11 +130,8 @@ let is_in_context node =
| _ -> true

type gccjit_param = Gccjit.param
type gccjit_lvalue = Gccjit.lvalue
type gccjit_rvalue = Gccjit.rvalue

let sexp_of_gccjit_param p = Sexp.Atom (Gccjit.Param.to_string p)
let sexp_of_gccjit_lvalue v = Sexp.Atom (Gccjit.LValue.to_string v)
let sexp_of_gccjit_rvalue v = Sexp.Atom (Gccjit.RValue.to_string v)

type ctx_nodes =
Expand Down Expand Up @@ -718,10 +715,6 @@ let%diagn_sexp compile_proc ~name ~opt_ctx_arrays ctx bindings ~get_ident
in
(ctx_info, opt_ctx_arrays, params)

let header_sep =
let open Re in
compile (seq [ str " "; opt any; str "="; str " " ])

let compile ~(name : string) ~opt_ctx_arrays bindings (lowered : Low_level.optimized) =
let get_ident = Low_level.get_ident_within_code ~no_dots:true [| lowered.llc |] in
let open Gccjit in
Expand Down
1 change: 1 addition & 0 deletions arrayjit/lib/gcc_backend.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include Backend_types.Lowered_no_device_backend

0 comments on commit e866289

Please sign in to comment.