Skip to content

Commit

Permalink
Remove now-unused fields of procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
lukstafi committed Oct 11, 2024
1 parent ef76c9b commit cdc7196
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 2 additions & 4 deletions arrayjit/lib/cc_backend.ml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ let init ~label =
type library = { lib : (Dl.library[@sexp.opaque]); libname : string } [@@deriving sexp_of]

type procedure = {
lowered : Low_level.optimized;
bindings : Indexing.unit_bindings;
name : string;
result : library;
Expand Down Expand Up @@ -157,7 +156,7 @@ let%diagn_sexp compile ~(name : string) ~opt_ctx_arrays bindings (lowered : Low_
let params = Syntax.compile_proc ~name pp_file.ppf idx_params ~is_global lowered in
pp_file.finalize ();
let result = c_compile_and_load ~f_name:pp_file.f_name in
{ lowered; result; params; bindings; name; opt_ctx_arrays }
{ result; params; bindings; name; opt_ctx_arrays }

let%diagn_sexp compile_batch ~names ~opt_ctx_arrays bindings
(lowereds : Low_level.optimized option array) =
Expand Down Expand Up @@ -207,9 +206,8 @@ let%diagn_sexp compile_batch ~names ~opt_ctx_arrays bindings
let opt_ctx_arrays = Option.map opt_ctx_arrays ~f:(fun _ -> !global_ctx_arrays) in
( opt_ctx_arrays,
Array.mapi params ~f:(fun i params ->
Option.map2 names.(i) lowereds.(i) ~f:(fun name lowered ->
Option.map names.(i) ~f:(fun name ->
{
lowered;
result;
params = Option.value_exn ~here:[%here] params;
bindings;
Expand Down
4 changes: 0 additions & 4 deletions arrayjit/lib/gcc_backend.gccjit.ml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ type procedure = {
result : (Gccjit.result[@sexp.opaque]);
opt_ctx_arrays : Ndarray.t Map.M(Tn).t option;
params : param_source list;
expected_merge_node : Tn.t option;
}
[@@deriving sexp_of]

Expand Down Expand Up @@ -737,7 +736,6 @@ let compile ~(name : string) ~opt_ctx_arrays bindings (lowered : Low_level.optim
name;
opt_ctx_arrays;
params = List.map ~f:snd params;
expected_merge_node = lowered.merge_node;
}

let%diagn_sexp compile_batch ~(names : string option array) ~opt_ctx_arrays bindings
Expand Down Expand Up @@ -783,8 +781,6 @@ let%diagn_sexp compile_batch ~(names : string option array) ~opt_ctx_arrays bind
name;
opt_ctx_arrays;
params = List.map ~f:snd params;
expected_merge_node =
Option.(join @@ map lowereds.(i) ~f:(fun optim -> optim.merge_node));
})) )

let alloc_buffer ?old_buffer ~size_in_bytes () =
Expand Down

0 comments on commit cdc7196

Please sign in to comment.