Skip to content

Commit

Permalink
[Tapir] Minor modifications to the OCaml bindings; Add OCaml bindings…
Browse files Browse the repository at this point in the history
… to the regression test suite.
  • Loading branch information
Willtor authored and neboat committed Sep 16, 2021
1 parent 201291f commit c17ed5e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
7 changes: 3 additions & 4 deletions llvm/bindings/ocaml/transforms/tapir_opts/llvm_tapir_opts.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
*
*===----------------------------------------------------------------------===*)

type tapir_target

(** Tapir pass to install Cilky stuff in place of detach/sync instructions. *)
external add_lower_tapir_to_cilk :
(** Tapir pass to install Cilky (or other target-specific) stuff in place of
detach/sync instructions. *)
external add_lower_tapir_to_target :
[ `Module ] Llvm.PassManager.t -> unit
= "llvm_add_lower_tapir_to_target"

Expand Down
7 changes: 3 additions & 4 deletions llvm/bindings/ocaml/transforms/tapir_opts/llvm_tapir_opts.mli
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
*
*===----------------------------------------------------------------------===*)

type tapir_target

(** Tapir pass to install Cilky stuff in place of detach/sync instructions. *)
external add_lower_tapir_to_cilk :
(** Tapir pass to install Cilky (or other target-specific) stuff in place of
detach/sync instructions. *)
external add_lower_tapir_to_target :
[ `Module ] Llvm.PassManager.t -> unit
= "llvm_add_lower_tapir_to_target"

Expand Down
6 changes: 5 additions & 1 deletion llvm/test/Bindings/OCaml/scalar_opts.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@

(* Note: It takes several seconds for ocamlopt to link an executable with
libLLVMCore.a, so it's better to write a big test than a bunch of
little ones. *)
little ones. For the same reason, the Tapir tests are added here
instead of in their own test suite. *)

open Llvm
open Llvm_scalar_opts
open Llvm_tapir_opts
open Llvm_target

let context = global_context ()
Expand Down Expand Up @@ -78,6 +80,8 @@ let test_transforms () =
++ add_type_based_alias_analysis
++ add_scoped_no_alias_alias_analysis
++ add_basic_alias_analysis
++ add_loop_spawning
++ add_lower_tapir_to_target
++ PassManager.initialize
++ PassManager.run_function fn
++ PassManager.finalize
Expand Down

0 comments on commit c17ed5e

Please sign in to comment.