[PATCH] D52212: [LLVM-C][OCaml] Add UnifyFunctionExitNodes pass to C and OCaml APIs
whitequark via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 18 06:37:39 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL342476: [LLVM-C][OCaml] Add UnifyFunctionExitNodes pass to C and OCaml APIs (authored by whitequark, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D52212
Files:
llvm/trunk/bindings/ocaml/transforms/scalar_opts/llvm_scalar_opts.ml
llvm/trunk/bindings/ocaml/transforms/scalar_opts/llvm_scalar_opts.mli
llvm/trunk/bindings/ocaml/transforms/scalar_opts/scalar_opts_ocaml.c
llvm/trunk/include/llvm-c/Transforms/Scalar.h
llvm/trunk/lib/Transforms/Scalar/Scalar.cpp
Index: llvm/trunk/lib/Transforms/Scalar/Scalar.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/Scalar.cpp
+++ llvm/trunk/lib/Transforms/Scalar/Scalar.cpp
@@ -26,6 +26,7 @@
#include "llvm/InitializePasses.h"
#include "llvm/Transforms/Scalar/GVN.h"
#include "llvm/Transforms/Scalar/SimpleLoopUnswitch.h"
+#include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h"
using namespace llvm;
@@ -278,3 +279,7 @@
void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createLowerExpectIntrinsicPass());
}
+
+void LLVMAddUnifyFunctionExitNodesPass(LLVMPassManagerRef PM) {
+ unwrap(PM)->add(createUnifyFunctionExitNodesPass());
+}
Index: llvm/trunk/bindings/ocaml/transforms/scalar_opts/llvm_scalar_opts.ml
===================================================================
--- llvm/trunk/bindings/ocaml/transforms/scalar_opts/llvm_scalar_opts.ml
+++ llvm/trunk/bindings/ocaml/transforms/scalar_opts/llvm_scalar_opts.ml
@@ -121,3 +121,6 @@
external add_basic_alias_analysis
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_basic_alias_analysis"
+external add_unify_function_exit_nodes
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_unify_function_exit_nodes"
Index: llvm/trunk/bindings/ocaml/transforms/scalar_opts/scalar_opts_ocaml.c
===================================================================
--- llvm/trunk/bindings/ocaml/transforms/scalar_opts/scalar_opts_ocaml.c
+++ llvm/trunk/bindings/ocaml/transforms/scalar_opts/scalar_opts_ocaml.c
@@ -248,3 +248,9 @@
LLVMAddBasicAliasAnalysisPass(PM);
return Val_unit;
}
+
+/* [<Llvm.PassManager.any] Llvm.PassManager.t -> unit */
+CAMLprim value llvm_add_unify_function_exit_nodes(LLVMPassManagerRef PM) {
+ LLVMAddUnifyFunctionExitNodesPass(PM);
+ return Val_unit;
+}
Index: llvm/trunk/bindings/ocaml/transforms/scalar_opts/llvm_scalar_opts.mli
===================================================================
--- llvm/trunk/bindings/ocaml/transforms/scalar_opts/llvm_scalar_opts.mli
+++ llvm/trunk/bindings/ocaml/transforms/scalar_opts/llvm_scalar_opts.mli
@@ -201,3 +201,8 @@
external add_basic_alias_analysis
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_basic_alias_analysis"
+
+(** See the [llvm::createUnifyFunctionExitNodesPass] function. *)
+external add_unify_function_exit_nodes
+ : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
+ = "llvm_add_unify_function_exit_nodes"
Index: llvm/trunk/include/llvm-c/Transforms/Scalar.h
===================================================================
--- llvm/trunk/include/llvm-c/Transforms/Scalar.h
+++ llvm/trunk/include/llvm-c/Transforms/Scalar.h
@@ -153,6 +153,9 @@
/** See llvm::createBasicAliasAnalysisPass function */
void LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM);
+/** See llvm::createUnifyFunctionExitNodesPass function */
+void LLVMAddUnifyFunctionExitNodesPass(LLVMPassManagerRef PM);
+
/**
* @}
*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52212.165955.patch
Type: text/x-patch
Size: 3024 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180918/89ab79ce/attachment.bin>
More information about the llvm-commits
mailing list