Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4 |
|
#
30f423a5 |
| 28-Feb-2023 |
Alan Hu <alanh@ccs.neu.edu> |
[OCaml] Migrate from naked pointers to prepare for OCaml 5
The OCaml bindings currently return pointers to LLVM objects as-is to OCaml. These "naked pointers" end up appearing as values of local var
[OCaml] Migrate from naked pointers to prepare for OCaml 5
The OCaml bindings currently return pointers to LLVM objects as-is to OCaml. These "naked pointers" end up appearing as values of local variables in OCaml code, stored as part of other OCaml values, etc. The safety of this design relies on the OCaml runtime system's ability to distinguish these pointers from pointers to memory on the OCaml garbage collected heap. In particular, when the OCaml GC encounters a pointer to memory known to not be part of the OCaml heap, it does not follow it.
In OCaml 4.02 an optimized "no naked pointers" mode was introduced where the runtime system does not perform such checks and requires that no such naked pointers be passed to OCaml code, instead one of several encodings needs to be used. In OCaml 5, the no naked pointers mode is now the only mode. This diff uses one of the potential encodings to eliminate naked pointers, making the LLVM OCaml bindings compatible with the "no naked pointers" mode of OCaml >= 4.02 and 5.
The encoding implemented in this diff relies on LLVM objects to be at least 2-byte aligned, meaning that the lsb of pointers will necessarily be clear. The encoding sets the lsb when passing LLVM pointers to OCaml, and clears it on the return path. Setting the lsb causes the OCaml runtime system to interpret the resulting value as a tagged integer, which does not participate in garbage collection.
In some cases, particularly functions that receive an OCaml array of LLVM pointers, this encoding requires allocation of a temporary array, but otherwise this diff aims to preserve the existing performance characteristics of the OCaml bindings.
Reviewed By: jberdine
Differential Revision: https://reviews.llvm.org/D136400
show more ...
|
Revision tags: llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4 |
|
#
f4d156ae |
| 28-Mar-2021 |
Josh Berdine <josh@berdine.net> |
[NFC][OCaml] Reformat to clean up following CAMLprim removal
The removal of CAMLprim left the code in need of an application of clang-format. There are various other changes made by clang-format whi
[NFC][OCaml] Reformat to clean up following CAMLprim removal
The removal of CAMLprim left the code in need of an application of clang-format. There are various other changes made by clang-format which it seems ought to be rolled together into this diff.
Differential Revision: https://reviews.llvm.org/D99477
show more ...
|
#
8e4fc55a |
| 28-Mar-2021 |
Josh Berdine <josh@berdine.net> |
[NFC][OCaml] Remove vestigial CAMLprim declarations
The CAMLprim macro has not been needed since OCaml 3.11, and is defined to the empty string. This diff removes all instances of it.
Differential
[NFC][OCaml] Remove vestigial CAMLprim declarations
The CAMLprim macro has not been needed since OCaml 3.11, and is defined to the empty string. This diff removes all instances of it.
Differential Revision: https://reviews.llvm.org/D99476
show more ...
|
Revision tags: llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1, llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1, llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1 |
|
#
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1, llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1, llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2, llvmorg-6.0.1-rc1, llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1, llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1, llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1, llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
#
52aadc8e |
| 31-Mar-2016 |
Jeroen Ketema <j.ketema@imperial.ac.uk> |
Silence warnings in OCaml bindings
* LLVMDisposeMessage lives in llvm-c/Core.h, include this file where necessary * LLVMAddTargetData has been removed, follow suit in the bindings
Differential Revi
Silence warnings in OCaml bindings
* LLVMDisposeMessage lives in llvm-c/Core.h, include this file where necessary * LLVMAddTargetData has been removed, follow suit in the bindings
Differential Revision: http://reviews.llvm.org/D18633
llvm-svn: 265001
show more ...
|
Revision tags: llvmorg-3.8.0, llvmorg-3.8.0-rc3, llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1, llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1, llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4, llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1, llvmorg-3.6.2, llvmorg-3.6.2-rc1, llvmorg-3.6.1, llvmorg-3.6.1-rc1, llvmorg-3.5.2, llvmorg-3.5.2-rc1, llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1 |
|
#
af6535bf |
| 24-Dec-2014 |
Peter Zotov <whitequark@whitequark.org> |
[OCaml] Expose Llvm_executionengine.get_{global_value,function}_address.
Patch by Ramkumar Ramachandra <artagnon@gmail.com>.
Also remove Llvm_executionengine.get_pointer_to_global, as it is actuall
[OCaml] Expose Llvm_executionengine.get_{global_value,function}_address.
Patch by Ramkumar Ramachandra <artagnon@gmail.com>.
Also remove Llvm_executionengine.get_pointer_to_global, as it is actually deprecated and didn't appear in a stable release.
llvm-svn: 224801
show more ...
|
Revision tags: llvmorg-3.5.1, llvmorg-3.5.1-rc2, llvmorg-3.5.1-rc1 |
|
#
b1f54ff4 |
| 31-Oct-2014 |
Peter Zotov <whitequark@whitequark.org> |
[OCaml] Rework Llvm_executionengine using ctypes.
Since JIT->MCJIT migration, most of the ExecutionEngine interface became deprecated and/or broken. This especially affected the OCaml bindings, as r
[OCaml] Rework Llvm_executionengine using ctypes.
Since JIT->MCJIT migration, most of the ExecutionEngine interface became deprecated and/or broken. This especially affected the OCaml bindings, as runFunction is no longer available, and unlike in C, it is not possible to coerce a pointer to a function and call it in OCaml.
In practice, LLVM 3.5 shipped completely unusable Llvm_executionengine.
The GenericValue interface and runFunction were essentially a poor man's FFI. As such, this interface was removed and instead a dependency on ctypes >=0.3 added, which handled platform-specific aspects of accessing data and calling functions.
The new interface does not expose JIT (which is a shim around MCJIT), as well as the interpreter (which can't handle a lot of valid IR).
Llvm_executionengine.add_global_mapping is currently unusable due to PR20656.
llvm-svn: 220957
show more ...
|
#
1b254f9a |
| 30-Oct-2014 |
Peter Zotov <whitequark@whitequark.org> |
[OCaml] De-duplicate llvm_raise and llvm_string_of_message.
llvm-svn: 220898
|
#
662538ac |
| 29-Oct-2014 |
Peter Zotov <whitequark@whitequark.org> |
[OCaml] Drop support for 3.12.1 and earlier.
In practice this means: * Always using -g flag. * Embedding -cclib -lstdc++ into the corresponding cma/cmxa file. This also moves -lstdc++ in a s
[OCaml] Drop support for 3.12.1 and earlier.
In practice this means: * Always using -g flag. * Embedding -cclib -lstdc++ into the corresponding cma/cmxa file. This also moves -lstdc++ in a single place. * Using caml_named_value instead of a homegrown mechanism.
llvm-svn: 220843
show more ...
|
#
3944e6e2 |
| 25-Oct-2014 |
Peter Zotov <whitequark@whitequark.org> |
[OCaml] Unbreak Llvm_executionengine.initialize_native_target.
First, return true on success, as it is the OCaml convention. Second, also initialize the native assembly printer, which is, despite th
[OCaml] Unbreak Llvm_executionengine.initialize_native_target.
First, return true on success, as it is the OCaml convention. Second, also initialize the native assembly printer, which is, despite the name, required for MCJIT operation.
Since this function did not initialize the assembly printer earlier and no function to initialize native assembly printer was available elsewhere, it is safe to break its interface: it means that it simply could not be used successfully before.
llvm-svn: 220620
show more ...
|
#
d1531a23 |
| 25-Oct-2014 |
Peter Zotov <whitequark@whitequark.org> |
[OCaml] Expose Llvm_executionengine.ExecutionEngine.create_mcjit.
llvm-svn: 220619
|
#
79cc1e3a |
| 02-Sep-2014 |
Eric Christopher <echristo@gmail.com> |
Reinstate "Nuke the old JIT." Approved by Jim Grosbach, Lang Hames, Rafael Espindola.
This reinstates commits r215111, 215115, 215116, 215117, 215136.
llvm-svn: 216982
|
Revision tags: llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3 |
|
#
b9fd9ed3 |
| 07-Aug-2014 |
Eric Christopher <echristo@gmail.com> |
Temporarily Revert "Nuke the old JIT." as it's not quite ready to be deleted. This will be reapplied as soon as possible and before the 3.6 branch date at any rate.
Approved by Jim Grosbach, Lang Ha
Temporarily Revert "Nuke the old JIT." as it's not quite ready to be deleted. This will be reapplied as soon as possible and before the 3.6 branch date at any rate.
Approved by Jim Grosbach, Lang Hames, Rafael Espindola.
This reverts commits r215111, 215115, 215116, 215117, 215136.
llvm-svn: 215154
show more ...
|
#
a3ddbc9d |
| 07-Aug-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix the ocaml bindings.
llvm-svn: 215117
|
Revision tags: llvmorg-3.5.0-rc2, llvmorg-3.5.0-rc1, llvmorg-3.4.2, llvmorg-3.4.2-rc1, llvmorg-3.4.1, llvmorg-3.4.1-rc2, llvmorg-3.4.1-rc1, llvmorg-3.4.0, llvmorg-3.4.0-rc3, llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1 |
|
#
8a1a3bfc |
| 15-Nov-2013 |
Peter Zotov <whitequark@whitequark.org> |
[OCaml] Refactor Llvm_target interface
This commit brings the module structure, argument order and primitive names in Llvm_target in order with the rest of the bindings, in preparation for adding Ta
[OCaml] Refactor Llvm_target interface
This commit brings the module structure, argument order and primitive names in Llvm_target in order with the rest of the bindings, in preparation for adding TargetMachine API.
llvm-svn: 194773
show more ...
|
#
d52cf175 |
| 11-Nov-2013 |
Peter Zotov <whitequark@whitequark.org> |
[OCaml] Make Llvm_target.DataLayout.t automatically managed
This breaks the API by removing Llvm_target.DataLayout.dispose.
llvm-svn: 194380
|
#
493cd8c0 |
| 01-Nov-2013 |
Sylvestre Ledru <sylvestre@debian.org> |
OCaml bindings: formatting This commit only changes comments and documentation in OCaml bindings. The official name of the language is OCaml, and the usage is now consistent.
Patch by Peter Zotov
l
OCaml bindings: formatting This commit only changes comments and documentation in OCaml bindings. The official name of the language is OCaml, and the usage is now consistent.
Patch by Peter Zotov
llvm-svn: 193836
show more ...
|
Revision tags: llvmorg-3.3.1-rc1, llvmorg-3.3.0, llvmorg-3.3.0-rc3, llvmorg-3.3.0-rc2, llvmorg-3.3.0-rc1, llvmorg-3.2.0, llvmorg-3.2.0-rc3, llvmorg-3.2.0-rc2, llvmorg-3.2.0-rc1 |
|
#
113b8c10 |
| 02-Sep-2012 |
Nuno Lopes <nunoplopes@sapo.pt> |
add support for ocaml 3.12
llvm-svn: 163096
|
Revision tags: llvmorg-3.1.0, llvmorg-3.1.0-rc3, llvmorg-3.1.0-rc2, llvmorg-3.1.0-rc1, llvmorg-3.0.0, llvmorg-3.0.0-rc4, llvmorg-3.0.0-rc3, llvmorg-3.0.0-rc2, llvmorg-3.0.0-rc1, llvmorg-2.9.0, llvmorg-2.9.0-rc3, llvmorg-2.9.0-rc2, llvmorg-2.9.0-rc1, llvmorg-2.8.0, llvmorg-2.8.0-rc3, llvmorg-2.8.0-rc2, llvmorg-2.8.0-rc1, llvmorg-2.8.0-rc0, llvmorg-2.7.0 |
|
#
3e64c26b |
| 03-Mar-2010 |
Erick Tryzelaar <idadesub@users.sourceforge.net> |
Rename some ocaml functions.
llvm-svn: 97684
|
#
f6fcdbcf |
| 02-Mar-2010 |
Erick Tryzelaar <idadesub@users.sourceforge.net> |
Use the ocaml tag 0 since we are just returning an option value.
llvm-svn: 97612
|
#
94feaafe |
| 02-Mar-2010 |
Erick Tryzelaar <idadesub@users.sourceforge.net> |
Expose the optimization level for the jit in ocaml.
llvm-svn: 97610
|
#
98b05d67 |
| 02-Mar-2010 |
Erick Tryzelaar <idadesub@users.sourceforge.net> |
Remove module providers from ocaml.
llvm-svn: 97609
|
Revision tags: llvmorg-2.6.0 |
|
#
b4e19177 |
| 14-Sep-2009 |
Erick Tryzelaar <idadesub@users.sourceforge.net> |
Expose initializing the native target for the execution engine.
llvm-svn: 81800
|
#
a1d3e660 |
| 24-Jun-2009 |
Bob Wilson <bob.wilson@apple.com> |
Fix the Ocaml bindings for the ExecutionEngine: with the change to build libraries instead of relinked objects, the interpreter, JIT, and native target libraries were not being linked in to an ocaml
Fix the Ocaml bindings for the ExecutionEngine: with the change to build libraries instead of relinked objects, the interpreter, JIT, and native target libraries were not being linked in to an ocaml program using the ExecutionEngine.
llvm-svn: 74117
show more ...
|
#
352ee2cb |
| 30-Apr-2009 |
Bill Wendling <isanbard@gmail.com> |
Fix the JIT bindings for ocaml.
llvm-svn: 70454
|