From 2457cfc63a493145be13d8f55251d1665d05b03a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 28 May 2018 16:58:10 +0000 Subject: [PATCH] [LLVM-C] [OCaml] Remove LLVMAddBBVectorizePass Summary: It was fully replaced back in 2014, and the implementation was removed 11 months ago by r306797. Reviewers: hfinkel, chandlerc, whitequark, deadalnix Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D47436 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333378 91177308-0d34-0410-b5e6-96231b3b80d8 --- bindings/ocaml/transforms/vectorize/llvm_vectorize.ml | 3 --- bindings/ocaml/transforms/vectorize/llvm_vectorize.mli | 5 ----- bindings/ocaml/transforms/vectorize/vectorize_ocaml.c | 6 ------ docs/ReleaseNotes.rst | 6 ++++-- include/llvm-c/Transforms/Vectorize.h | 3 --- lib/Transforms/Vectorize/Vectorize.cpp | 4 ---- test/Bindings/OCaml/vectorize.ml | 1 - 7 files changed, 4 insertions(+), 24 deletions(-) diff --git a/bindings/ocaml/transforms/vectorize/llvm_vectorize.ml b/bindings/ocaml/transforms/vectorize/llvm_vectorize.ml index 88831daf519..f9f6be26d7f 100644 --- a/bindings/ocaml/transforms/vectorize/llvm_vectorize.ml +++ b/bindings/ocaml/transforms/vectorize/llvm_vectorize.ml @@ -7,9 +7,6 @@ * *===----------------------------------------------------------------------===*) -external add_bb_vectorize - : [ unit - = "llvm_add_bb_vectorize" external add_loop_vectorize : [ unit = "llvm_add_loop_vectorize" diff --git a/bindings/ocaml/transforms/vectorize/llvm_vectorize.mli b/bindings/ocaml/transforms/vectorize/llvm_vectorize.mli index 23a68a28dad..f9b4ce5aae5 100644 --- a/bindings/ocaml/transforms/vectorize/llvm_vectorize.mli +++ b/bindings/ocaml/transforms/vectorize/llvm_vectorize.mli @@ -12,11 +12,6 @@ This interface provides an OCaml API for LLVM vectorize transforms, the classes in the [LLVMVectorize] library. *) -(** See the [llvm::createBBVectorizePass] function. *) -external add_bb_vectorize - : [ unit - = "llvm_add_bb_vectorize" - (** See the [llvm::createLoopVectorizePass] function. *) external add_loop_vectorize : [ unit diff --git a/bindings/ocaml/transforms/vectorize/vectorize_ocaml.c b/bindings/ocaml/transforms/vectorize/vectorize_ocaml.c index 1c8104951c4..dcd9231b5bf 100644 --- a/bindings/ocaml/transforms/vectorize/vectorize_ocaml.c +++ b/bindings/ocaml/transforms/vectorize/vectorize_ocaml.c @@ -20,12 +20,6 @@ #include "caml/misc.h" /* [ unit */ -CAMLprim value llvm_add_bb_vectorize(LLVMPassManagerRef PM) { - LLVMAddBBVectorizePass(PM); - return Val_unit; -} - -/* [ unit */ CAMLprim value llvm_add_loop_vectorize(LLVMPassManagerRef PM) { LLVMAddLoopVectorizePass(PM); return Val_unit; diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index 614c63a6547..2fb71e40c3a 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -146,13 +146,15 @@ Changes to the AVR Target Changes to the OCaml bindings ----------------------------- - During this release ... +* Remove ``add_bb_vectorize``. Changes to the C API -------------------- - During this release ... +* Remove ``LLVMAddBBVectorizePass``. The implementation was removed and the C + interface was made a deprecated no-op in LLVM 5. Use + ``LLVMAddSLPVectorizePass`` instead to get the supported SLP vectorizer. External Open Source Projects Using LLVM 7 diff --git a/include/llvm-c/Transforms/Vectorize.h b/include/llvm-c/Transforms/Vectorize.h index cf8306aee76..e3f9961acfb 100644 --- a/include/llvm-c/Transforms/Vectorize.h +++ b/include/llvm-c/Transforms/Vectorize.h @@ -33,9 +33,6 @@ extern "C" { * @{ */ -/** DEPRECATED - Use LLVMAddSLPVectorizePass */ -void LLVMAddBBVectorizePass(LLVMPassManagerRef PM); - /** See llvm::createLoopVectorizePass function. */ void LLVMAddLoopVectorizePass(LLVMPassManagerRef PM); diff --git a/lib/Transforms/Vectorize/Vectorize.cpp b/lib/Transforms/Vectorize/Vectorize.cpp index b04905bfc6f..f62a8855832 100644 --- a/lib/Transforms/Vectorize/Vectorize.cpp +++ b/lib/Transforms/Vectorize/Vectorize.cpp @@ -34,10 +34,6 @@ void LLVMInitializeVectorization(LLVMPassRegistryRef R) { initializeVectorization(*unwrap(R)); } -// DEPRECATED: Remove after the LLVM 5 release. -void LLVMAddBBVectorizePass(LLVMPassManagerRef PM) { -} - void LLVMAddLoopVectorizePass(LLVMPassManagerRef PM) { unwrap(PM)->add(createLoopVectorizePass()); } diff --git a/test/Bindings/OCaml/vectorize.ml b/test/Bindings/OCaml/vectorize.ml index fab0901d3c5..72cd191b362 100644 --- a/test/Bindings/OCaml/vectorize.ml +++ b/test/Bindings/OCaml/vectorize.ml @@ -42,7 +42,6 @@ let test_transforms () = ignore (build_ret_void (builder_at_end context (entry_block fn))); ignore (PassManager.create () - ++ add_bb_vectorize ++ add_loop_vectorize ++ add_slp_vectorize ++ PassManager.run_module m -- 2.11.0