This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by jberdine on Sep 17 2018, 6:25 PM.

Details

Summary

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

Diff Detail

Repository
rL LLVM

Event Timeline

jberdine created this revision.Sep 17 2018, 6:25 PM
whitequark requested changes to this revision.Sep 17 2018, 6:44 PM
whitequark added inline comments.
bindings/ocaml/transforms/scalar_opts/llvm_scalar_opts.ml
124 ↗(On Diff #165870)

Shouldn't this function be called the same way it's called in C API and opt -help? Otherwise it's confusing.

This revision now requires changes to proceed.Sep 17 2018, 6:44 PM
jberdine added inline comments.Sep 18 2018, 4:37 AM
bindings/ocaml/transforms/scalar_opts/llvm_scalar_opts.ml
124 ↗(On Diff #165870)

Will change. It wasn't clear to me, since opt -help has:

-mergereturn                                    - Unify function exit nodes
jberdine marked an inline comment as done.Sep 18 2018, 6:16 AM
whitequark accepted this revision.Sep 18 2018, 6:35 AM

Ah yes, in this case the C API name (and when adding a C API, C++ API name) would be preferred over opt -help, since I imagine that anyone writing code against LLVM bindings would consult doxygen.

This revision is now accepted and ready to land.Sep 18 2018, 6:35 AM
This revision was automatically updated to reflect the committed changes.