llvm.org GIT mirror llvm / b224dd6
[LLVM-C][OCaml] Add LowerAtomic pass to C and OCaml APIs Summary: Adds LLVMAddLowerAtomicPass to expose createLowerAtomicPass in the C and OCaml APIs. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D52211 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342475 91177308-0d34-0410-b5e6-96231b3b80d8 whitequark 1 year, 1 month ago
5 changed file(s) with 21 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
6363 external add_partially_inline_lib_calls
6464 : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
6565 = "llvm_add_partially_inline_lib_calls"
66 external add_lower_atomic
67 : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
68 = "llvm_add_lower_atomic"
6669 external add_lower_switch
6770 : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
6871 = "llvm_add_lower_switch"
106106 : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
107107 = "llvm_add_partially_inline_lib_calls"
108108
109 (** See the [llvm::createLowerAtomicPass] function. *)
110 external add_lower_atomic
111 : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
112 = "llvm_add_lower_atomic"
113
109114 (** See the [llvm::createLowerSwitchPass] function. *)
110115 external add_lower_switch
111116 : [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
134134 }
135135
136136 /* [ unit */
137 CAMLprim value llvm_add_lower_atomic(LLVMPassManagerRef PM) {
138 LLVMAddLowerAtomicPass(PM);
139 return Val_unit;
140 }
141
142 /* [ unit */
137143 CAMLprim value llvm_add_lower_switch(LLVMPassManagerRef PM) {
138144 LLVMAddLowerSwitchPass(PM);
139145 return Val_unit;
9191 /** See llvm::createLoopUnswitchPass function. */
9292 void LLVMAddLoopUnswitchPass(LLVMPassManagerRef PM);
9393
94 /** See llvm::createLowerAtomicPass function. */
95 void LLVMAddLowerAtomicPass(LLVMPassManagerRef PM);
96
9497 /** See llvm::createMemCpyOptPass function. */
9598 void LLVMAddMemCpyOptPass(LLVMPassManagerRef PM);
9699
193193 unwrap(PM)->add(createLoopUnswitchPass());
194194 }
195195
196 void LLVMAddLowerAtomicPass(LLVMPassManagerRef PM) {
197 unwrap(PM)->add(createLowerAtomicPass());
198 }
199
196200 void LLVMAddMemCpyOptPass(LLVMPassManagerRef PM) {
197201 unwrap(PM)->add(createMemCpyOptPass());
198202 }