1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[LLVM-C][OCaml] Add UnifyFunctionExitNodes pass to C and OCaml APIs

Summary:
Adds LLVMAddUnifyFunctionExitNodesPass to expose
createUnifyFunctionExitNodesPass to the C and OCaml APIs.

Reviewers: whitequark, deadalnix

Reviewed By: whitequark

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D52212

llvm-svn: 342476
This commit is contained in:
whitequark 2018-09-18 13:36:03 +00:00
parent 0d2f668e5a
commit 442e076ce3
5 changed files with 22 additions and 0 deletions

View File

@ -121,3 +121,6 @@ external add_scoped_no_alias_alias_analysis
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"

View File

@ -201,3 +201,8 @@ external add_scoped_no_alias_alias_analysis
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"

View File

@ -248,3 +248,9 @@ CAMLprim value llvm_add_basic_alias_analysis(LLVMPassManagerRef PM) {
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;
}

View File

@ -153,6 +153,9 @@ void LLVMAddScopedNoAliasAAPass(LLVMPassManagerRef PM);
/** See llvm::createBasicAliasAnalysisPass function */
void LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM);
/** See llvm::createUnifyFunctionExitNodesPass function */
void LLVMAddUnifyFunctionExitNodesPass(LLVMPassManagerRef PM);
/**
* @}
*/

View File

@ -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 LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM) {
void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createLowerExpectIntrinsicPass());
}
void LLVMAddUnifyFunctionExitNodesPass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createUnifyFunctionExitNodesPass());
}