summaryrefslogtreecommitdiffstats
path: root/llvm/bindings
Commit message (Collapse)AuthorAgeFilesLines
...
* [OCaml] [autoconf] Migrate to ocamlfind.Peter Zotov2014-10-301-46/+18
| | | | | | | | | | | | | | | | | | | | | | This commit updates the OCaml bindings and tests to use ocamlfind. The bindings are migrated in order to use ctypes, which are now required for MCJIT-backed Llvm_executionengine. The tests are migrated in order to use OUnit and to verify that the distributed META.llvm allows to build working executables. Every OCaml toolchain invocation is now chained through ocamlfind, which (in theory) allows to cross-compile the OCaml bindings. The configure script now checks for ctypes (>= 0.2.3) and OUnit (>= 2). The code depending on these libraries will be added later. The configure script does not check the package versions in order to keep changes less invasive. Additionally, OCaml bindings will now be automatically enabled if ocamlfind is detected on the system, rather than ocamlc, as it was before. llvm-svn: 220899
* [OCaml] De-duplicate llvm_raise and llvm_string_of_message.Peter Zotov2014-10-307-71/+14
| | | | llvm-svn: 220898
* [OCaml] Expose Llvm.parse_command_line_options.Peter Zotov2014-10-293-0/+21
| | | | llvm-svn: 220847
* [OCaml] Expose Llvm_target.TargetMachine.add_analysis_passes.Peter Zotov2014-10-293-0/+13
| | | | llvm-svn: 220846
* [OCaml] If compiled without --enable-shared, hide packages from toplevel.Peter Zotov2014-10-292-0/+2
| | | | | | | | | | | Pretend they do not exist using exists_if. This is better than the current situation, which is the error: Error: The external function `llvm_global_succ' is not available but still somewhat confusing. llvm-svn: 220845
* [OCaml] Expose Llvm_bitwriter.write_bitcode_to_memory_buffer.Peter Zotov2014-10-293-13/+28
| | | | llvm-svn: 220844
* [OCaml] Drop support for 3.12.1 and earlier.Peter Zotov2014-10-2928-262/+166
| | | | | | | | | | 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
* [OCaml] Synchronize transformations with LLVM-C.Peter Zotov2014-10-299-385/+479
| | | | | | | Also, rearrange the functions in a way that allows to quickly compare C headers and .mli/glue files. llvm-svn: 220842
* [OCaml] PR19859: Add functions to query and modify branches.Peter Zotov2014-10-283-0/+140
| | | | | | Patch by Gabriel Radanne <drupyog@zoho.com>. llvm-svn: 220818
* [OCaml] PR19859: Add Llvm.{fcmp_predicate,float_of_const}.Peter Zotov2014-10-283-0/+40
| | | | | | Patch by Gabriel Radanne <drupyog@zoho.com>. llvm-svn: 220815
* [OCaml] Enable -g for debug builds.Peter Zotov2014-10-281-4/+3
| | | | | | We don't care about pre-3.12.1 anymore. llvm-svn: 220767
* [OCaml] Fix whitespace.Peter Zotov2014-10-2813-65/+65
| | | | llvm-svn: 220766
* [OCaml] Expose existing documentation in ocamldoc.Peter Zotov2014-10-261-43/+43
| | | | | | Patch by Gabriel Radanne <drupyog@zoho.com>. llvm-svn: 220648
* [OCaml] Unbreak Llvm_executionengine.initialize_native_target.Peter Zotov2014-10-251-14/+16
| | | | | | | | | | | | | 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
* [OCaml] Expose Llvm_executionengine.ExecutionEngine.create_mcjit.Peter Zotov2014-10-253-27/+103
| | | | llvm-svn: 220619
* Add llvm-go tool.Peter Collingbourne2014-10-231-41/+5
| | | | | | | | | | | | This tool lets us build LLVM components within the tree by setting up a $GOPATH that resembles a tree fetched in the normal way with "go get". It is intended that components such as the Go frontend will be built in-tree using this tool. Differential Revision: http://reviews.llvm.org/D5902 llvm-svn: 220462
* Go: add binding for LLVMSetUnnamedAddr.Peter Collingbourne2014-10-221-0/+1
| | | | llvm-svn: 220416
* [OCaml] Fix a typo in documentation.Peter Zotov2014-10-221-1/+1
| | | | llvm-svn: 220377
* Fix bashism in build.sh.Peter Collingbourne2014-10-171-1/+1
| | | | llvm-svn: 220027
* [OCaml] Add Llvm.instr_clone.Peter Zotov2014-10-173-0/+13
| | | | llvm-svn: 220008
* Initial version of Go bindings.Peter Collingbourne2014-10-1632-1/+4268
| | | | | | | | | | | | This code is based on the existing LLVM Go bindings project hosted at: https://github.com/go-llvm/llvm Note that all contributors to the gollvm project have agreed to relicense their changes under the LLVM license and submit them to the LLVM project. Differential Revision: http://reviews.llvm.org/D5684 llvm-svn: 219976
* Reinstate "Nuke the old JIT."Eric Christopher2014-09-022-2/+2
| | | | | | | | Approved by Jim Grosbach, Lang Hames, Rafael Espindola. This reinstates commits r215111, 215115, 215116, 215117, 215136. llvm-svn: 216982
* [OCaml] Expose Llvm.get_operand_use.Peter Zotov2014-08-123-0/+11
| | | | | | Patch by Gabriel Radanne <drupyog@zoho.com> llvm-svn: 215420
* Temporarily Revert "Nuke the old JIT." as it's not quite ready toEric Christopher2014-08-072-2/+2
| | | | | | | | | | | 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
* Fix the ocaml bindings.Rafael Espindola2014-08-072-2/+2
| | | | llvm-svn: 215117
* [OCaml] Add Llvm.{string_of_const,const_element}.Peter Zotov2014-08-033-1/+35
| | | | llvm-svn: 214677
* [OCaml] Don't truncate constants over 32 bits in Llvm.const_int.Peter Zotov2014-07-221-1/+1
| | | | llvm-svn: 213655
* MergedLoadStoreMotion passGerolf Hoflehner2014-07-181-0/+6
| | | | | | | | | | | Merges equivalent loads on both sides of a hammock/diamond and hoists into into the header. Merges equivalent stores on both sides of a hammock/diamond and sinks it to the footer. Can enable if conversion and tolerate better load misses and store operand latencies. llvm-svn: 213396
* [OCaml] Documentation improvements.Peter Zotov2014-07-021-26/+28
| | | | | | Patch by Julien Sagot llvm-svn: 212230
* [OCaml] Documentation improvements.Peter Zotov2014-06-302-3/+5
| | | | llvm-svn: 212048
* [OCaml] Unbreak Llvm_target.TargetMachine.set_verbose_asmPeter Zotov2014-06-091-2/+2
| | | | | | Patch by Jacques-Pascal Deplaix llvm-svn: 210480
* [OCaml] Commit missing parts of r210395Peter Zotov2014-06-071-1/+1
| | | | llvm-svn: 210396
* [OCaml] Introduce an llmdkind abstract type.Peter Zotov2014-06-072-7/+11
| | | | | | | | | Patch by Gabriel Radanne. While this commit technically breaks API, no code should have supplied the integer IDs directly, and thus no code should break. llvm-svn: 210395
* [OCaml] Add an ocamlfind package llvm.all_backends.Peter Zotov2014-05-016-1/+83
| | | | | | | | This package is useful for architecture-independent tools like llc. Patch by Jacques-Pascal Deplaix. llvm-svn: 207793
* [python] Fix getting section contents.Anders Waldenborg2014-04-252-2/+12
| | | | | | | | | | | The returnvalue was handled as c_char_p which ment that ctypes handled it as a NUL-terminated string making it cut the contents at first NUL (or even worse - overrunning the buffer if it doesn't contain a NUL). Differential Revision: http://reviews.llvm.org/D3474 llvm-svn: 207199
* [python] Fix python bindings testsAnders Waldenborg2014-04-231-1/+0
| | | | | | | Broke after the changes related to the LLVMGetSymbolFileOffset removal in r206750 llvm-svn: 207018
* Convert getFileOffset to getOffset and move it to its only user.Rafael Espindola2014-04-211-12/+0
| | | | | | | | | | | | | We normally don't drop functions from the C API's, but in this case I think we can: * The old implementation of getFileOffset was fairly broken * The introduction of LLVMGetSymbolFileOffset was itself a C api breaking change as it removed LLVMGetSymbolOffset. * It is an incredibly specialized use case. The only reason MCJIT needs it is because of its odd position of being a dynamic linker of .o files. llvm-svn: 206750
* [python-bindings] Remove some cruft that snuck in.Michael Gottesman2014-02-231-4/+2
| | | | llvm-svn: 201966
* [python-bindings] Added OpCode like support for all enumerations with unittests.Michael Gottesman2014-02-222-37/+139
| | | | | | Also fixed some trailing whitespace issues. llvm-svn: 201929
* Makefile.ocaml: Tweak to use --system-libs.NAKAMURA Takumi2013-12-201-1/+1
| | | | llvm-svn: 197758
* Fix documentation typosAlp Toker2013-12-202-3/+3
| | | | llvm-svn: 197757
* [OCaml] Add a slash accidentally omitted from MakefilePeter Zotov2013-11-281-1/+1
| | | | llvm-svn: 195912
* [OCaml] Embed rpath into stub libraries and native executablesPeter Zotov2013-11-271-3/+12
| | | | | | | | | | | | | | This commit embeds a set of linker flags with hardcoded paths to the LLVM shared library on --enable-shared builds into .cmxa files and stub dynamic libraries. This solution closely follows existing rules for rpath in the LLVM tools, which had to be modified because of differences in toolchain. Without this patch, OCaml tests as well as opam bindings broke, as neither of those updates LD_LIBRARY_PATH to include the $prefix/lib directory. llvm-svn: 195834
* [OCaml] Embed the flags necessary for linking with libLLVM.so into .cmxa filesPeter Zotov2013-11-261-0/+1
| | | | llvm-svn: 195782
* [OCaml] Unbreak make install by providing ocamldoc targetPeter Zotov2013-11-211-1/+6
| | | | llvm-svn: 195336
* python: Fix check for disasm creation failureAnders Waldenborg2013-11-172-1/+5
| | | | | | | | | | | | Check should be for pointer being NULL, not what it points to. Also adds a test for this case. Reviewed By: indygreg Differential Revision: http://llvm-reviews.chandlerc.com/D1878 llvm-svn: 194965
* python: Properly initialize before trying to create disasmAnders Waldenborg2013-11-171-0/+26
| | | | | | | | | | | | | | | | | As the "LLVMInitializeAll*" functions are not available as symbols in the shared library they can't be used, and as a workaround a list of the targets is kept and the individual symbols tried. As soon as the "All"-functions are changed to proper symbols (as opposed to static inlines in the headers) this hack will be replace with simple calls to the corresponding "LLVMInitializeAll*" functions. Reviewed By: indygreg CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1879 llvm-svn: 194964
* [OCaml] Add Target and TargetMachine bindings to Llvm_targetPeter Zotov2013-11-153-1/+464
| | | | llvm-svn: 194774
* [OCaml] Refactor Llvm_target interfacePeter Zotov2013-11-156-180/+186
| | | | | | | | 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
* [OCaml] Fix building of stub librariesPeter Zotov2013-11-153-8/+8
| | | | llvm-svn: 194772
OpenPOWER on IntegriCloud