Bob Wilson
da7be91e1c
Fix a typo.
...
llvm-svn: 111627
2010-08-20 14:54:37 +00:00
Erick Tryzelaar
b4d48706ca
Expose LLVMSetOperand and LLVMGetNumOperands to llvm-c and ocaml.
...
llvm-svn: 111625
2010-08-20 14:51:22 +00:00
Erick Tryzelaar
34ce63a464
Fix arguments to ocaml's llvm_params.
...
Thanks to Jianzhou Zhao for finding this.
llvm-svn: 111624
2010-08-20 14:51:16 +00:00
Bill Wendling
03bcd6ecc8
Implement the "linker_private_weak" linkage type. This will be used for
...
Objective-C metadata types which should be marked as "weak", but which the
linker will remove upon final linkage. However, this linkage isn't specific to
Objective-C.
For example, the "objc_msgSend_fixup_alloc" symbol is defined like this:
.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1
This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".
Currently only supported on Darwin platforms.
llvm-svn: 107433
2010-07-01 21:55:59 +00:00
Bill Wendling
3632171750
Revert r107205 and r107207.
...
llvm-svn: 107215
2010-06-29 22:34:52 +00:00
Bill Wendling
1767723dbe
Introducing the "linker_weak" linkage type. This will be used for Objective-C
...
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:
.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1
This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".
llvm-svn: 107205
2010-06-29 21:24:00 +00:00
Chris Lattner
2694145e2e
add attributes and module level asm to the ocaml bindings,
...
patch by Patrick Walton!
llvm-svn: 100932
2010-04-10 17:52:58 +00:00
Erick Tryzelaar
f11976538e
Add OCaml tutorial to the examples.
...
llvm-svn: 97966
2010-03-08 19:32:27 +00:00
Erick Tryzelaar
381268e629
Add a LLVMWriteBitcodeToFD that exposes the raw_fd_ostream options.
...
llvm-svn: 97858
2010-03-06 00:30:06 +00:00
Erick Tryzelaar
ab5ac37c31
Expose the rest of the llvm-c scalar opts to ocaml.
...
llvm-svn: 97685
2010-03-03 23:51:34 +00:00
Erick Tryzelaar
3e64c26b2f
Rename some ocaml functions.
...
llvm-svn: 97684
2010-03-03 23:51:30 +00:00
Erick Tryzelaar
7dd2615503
Expose the external functions for ocaml's execution engine as an optimization.
...
llvm-svn: 97683
2010-03-03 23:51:28 +00:00
Erick Tryzelaar
8f69feac47
Expose alignment and stack alignment attributes to llvm-c and ocaml.
...
llvm-svn: 97682
2010-03-03 23:51:25 +00:00
Erick Tryzelaar
f6fcdbcf9c
Use the ocaml tag 0 since we are just returning an option value.
...
llvm-svn: 97612
2010-03-02 23:59:08 +00:00
Erick Tryzelaar
e9096c8289
Don't use an ocaml keyword in an ocamldoc comment.
...
llvm-svn: 97611
2010-03-02 23:59:05 +00:00
Erick Tryzelaar
94feaafe1e
Expose the optimization level for the jit in ocaml.
...
llvm-svn: 97610
2010-03-02 23:59:03 +00:00
Erick Tryzelaar
98b05d67e9
Remove module providers from ocaml.
...
llvm-svn: 97609
2010-03-02 23:59:00 +00:00
Erick Tryzelaar
a48e627126
Add support for use to ocaml.
...
llvm-svn: 97586
2010-03-02 20:32:32 +00:00
Erick Tryzelaar
84f5ba80df
Add support getting the operands of a User to ocaml.
...
llvm-svn: 97414
2010-02-28 20:45:03 +00:00
Erick Tryzelaar
9190a2af9d
Add support for global aliases to ocaml.
...
llvm-svn: 97413
2010-02-28 20:44:58 +00:00
Erick Tryzelaar
e533a41c24
Add support for inserting inline asm to ocaml.
...
llvm-svn: 97412
2010-02-28 20:44:53 +00:00
Erick Tryzelaar
28db1a3e61
Add support for getting a null pointer.
...
llvm-svn: 97380
2010-02-28 09:46:27 +00:00
Erick Tryzelaar
272d62bc5a
Add a way to look up a type by it's name in a module.
...
llvm-svn: 97379
2010-02-28 09:46:21 +00:00
Erick Tryzelaar
6fdb7a6547
Add replace_all_uses_with to ocaml.
...
llvm-svn: 97378
2010-02-28 09:46:16 +00:00
Erick Tryzelaar
06894b3824
Add support for global variables in an address space for llvm-c and ocaml.
...
llvm-svn: 97377
2010-02-28 09:46:13 +00:00
Erick Tryzelaar
0fb26ef01f
Add indirect br support to llvm-c and ocaml.
...
llvm-svn: 97376
2010-02-28 09:46:06 +00:00
Erick Tryzelaar
d8531faf95
Add metadata functions to llvm-c and ocaml.
...
llvm-svn: 97375
2010-02-28 09:45:59 +00:00
Erick Tryzelaar
4c340c7f7f
Add the new builder arthmetic instructions to llvm-c and ocaml.
...
llvm-svn: 97372
2010-02-28 05:51:43 +00:00
Erick Tryzelaar
a8053dfd27
Add the new union arthmetic instructions to llvm-c and ocaml.
...
llvm-svn: 97371
2010-02-28 05:51:33 +00:00
Erick Tryzelaar
5bfa919e66
Fix incorrect uses of an ocaml llbuilder without extracting it from ocaml.
...
llvm-svn: 97368
2010-02-28 05:51:16 +00:00
Erick Tryzelaar
4417431e0e
Remove malloc and free from the ocaml bindings.
...
llvm-svn: 97367
2010-02-28 05:51:09 +00:00
Jeffrey Yasskin
67c0aece75
Fix the ocaml bindings for the bitcode reader.
...
llvm_get_module_provider() was returning a value of the wrong type.
llvm-svn: 97290
2010-02-27 00:25:18 +00:00
Erick Tryzelaar
3b391a6dfa
Fix some ocaml documentation
...
llvm-svn: 96323
2010-02-16 03:45:17 +00:00
Chris Lattner
fd8a55167f
fix llvm_build_struct_gep for PR6167, patch by
...
Peter Hawkins!
llvm-svn: 95644
2010-02-09 01:39:46 +00:00
Jakob Stoklund Olesen
74bb06c0f0
Reintroduce the InlineHint function attribute.
...
This time it's for real! I am going to hook this up in the frontends as well.
The inliner has some experimental heuristics for dealing with the inline hint.
When given a -respect-inlinehint option, functions marked with the inline
keyword are given a threshold just above the default for -O3.
We need some experiments to determine if that is the right thing to do.
llvm-svn: 95466
2010-02-06 01:16:28 +00:00
Chris Lattner
289372e341
This corrects an error in the type of the Llvm.dispose_context function.
...
Patch by James Woodyatt!
llvm-svn: 94343
2010-01-24 00:25:09 +00:00
Erick Tryzelaar
fb47255591
Fix bug 5992: O'Caml's llvm_create_module was treating the context as a string.
...
Thanks Andy Ray for catching this!
llvm-svn: 93588
2010-01-15 23:49:16 +00:00
Eric Christopher
8444d7536c
Remove the InlineHint attribute. There are no current or planned
...
users.
llvm-svn: 93558
2010-01-15 21:36:30 +00:00
Bob Wilson
a8e2997aa0
Fix another parallel make race condition.
...
llvm-svn: 91709
2009-12-18 20:12:14 +00:00
Erick Tryzelaar
c3a9a08e49
Expose the rest of the attribute settings.
...
llvm-svn: 82965
2009-09-28 04:42:47 +00:00
Erick Tryzelaar
b0d17ac4ef
Fix a bug in ocaml bindings that has incorrect linkage options.
...
llvm-svn: 82964
2009-09-28 04:42:36 +00:00
Erick Tryzelaar
b4e19177cb
Expose initializing the native target for the execution engine.
...
llvm-svn: 81800
2009-09-14 21:54:32 +00:00
Bob Wilson
f544a534cf
Fix pr4820: Don't run llvm-config during "make clean" since it may have
...
already been removed.
llvm-svn: 81547
2009-09-11 18:42:18 +00:00
Erick Tryzelaar
a64b1c1d4c
Fix header comment for bindings/ocaml/llvm/Makefile.
...
llvm-svn: 80526
2009-08-30 23:41:20 +00:00
Erick Tryzelaar
8ce532bfea
Convert the rest of the ocaml types and functions to use context.
...
llvm-svn: 79430
2009-08-19 17:32:24 +00:00
Erick Tryzelaar
d552be457a
Add the ocaml binding to LLVMBuildAggregateRet.
...
llvm-svn: 79414
2009-08-19 08:37:00 +00:00
Erick Tryzelaar
5c35b5cf91
Allow passing around LLVMContext in ocaml.
...
llvm-svn: 79410
2009-08-19 06:40:29 +00:00
Edward O'Callaghan
2e9e3c3316
LLVM Ada language bindings. Credit to Rod Kay and the AuroraUX team.
...
llvm-svn: 79295
2009-08-18 00:24:36 +00:00
Erick Tryzelaar
ba167da17a
Expose creating constant ints and floats from strings to ocaml.
...
llvm-svn: 79214
2009-08-16 23:37:03 +00:00
Erick Tryzelaar
9813beadcd
Add an llvm-c function that lets you insert an instruction with a name.
...
llvm-svn: 79163
2009-08-16 02:20:57 +00:00
Erick Tryzelaar
f57618f62d
Expose most of the Constant creation functions to ocaml.
...
llvm-svn: 79162
2009-08-16 02:20:37 +00:00
Erick Tryzelaar
3235144799
Expose most of the IRBuilder functionality to ocaml.
...
llvm-svn: 79161
2009-08-16 02:20:24 +00:00
Erick Tryzelaar
48708c9641
Fix comment in llvm.mli.
...
llvm-svn: 78591
2009-08-10 19:45:00 +00:00
Erick Tryzelaar
c475d136cb
Fix docstring for ocaml binding's const_float.
...
llvm-svn: 78589
2009-08-10 19:44:45 +00:00
Bob Wilson
c2a942ec54
Reorder the "Metadata" entry to match the C bindings.
...
This fixes a regression in the vmcore.ml dejagnu test.
llvm-svn: 76657
2009-07-21 21:52:57 +00:00
Reid Kleckner
fc8a2d5a83
Add EngineBuilder to ExecutionEngine in favor of the five optional argument EE::create().
...
Also a test commit.
llvm-svn: 76276
2009-07-18 00:42:18 +00:00
Bob Wilson
a1d3e660ae
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
2009-06-24 21:09:18 +00:00
Chris Lattner
f46306a697
remove dead makefile flags.
...
llvm-svn: 74064
2009-06-24 05:28:55 +00:00
Nick Lewycky
adbc284666
Give embedded metadata its own type instead of relying on EmptyStructTy.
...
llvm-svn: 72610
2009-05-30 05:06:04 +00:00
Duncan Sands
dfc2e57137
Hopefully fix the build for people with ocaml.
...
llvm-svn: 72254
2009-05-22 09:22:17 +00:00
Duncan Sands
d334aca93f
Add a getAlignOf helper for getting the ABI alignment of a
...
type as a target independent constant expression. I confess
that I didn't check that this method works as intended (though
I did test the equivalent hand-written IR a little). But what
could possibly go wrong!
llvm-svn: 72213
2009-05-21 15:52:21 +00:00
Duncan Sands
af9eaa830a
Rename PaddedSize to AllocSize, in the hope that this
...
will make it more obvious what it represents, and stop
it being confused with the StoreSize.
llvm-svn: 71349
2009-05-09 07:06:46 +00:00
Duncan Sands
7374a0118d
OCaml parameter attribute bindings from PR2752.
...
Incomplete, but better than nothing.
llvm-svn: 71081
2009-05-06 12:21:17 +00:00
Bill Wendling
352ee2cb05
Fix the JIT bindings for ocaml.
...
llvm-svn: 70454
2009-04-30 00:43:39 +00:00
Nick Lewycky
e2b8261d87
Fix ocaml bindings; add "available_externally" linkage type.
...
llvm-svn: 68945
2009-04-13 07:02:32 +00:00
Bob Wilson
8932717421
Fix a parallel make race condition by swapping the order of -I directories.
...
The .cmi files are generated in $(ObjDir) and then copied to $(OcamlDir).
The ocamldep output references the .cmi files in $(ObjDir), so make kicks
off a dependent compile as soon as the local copy is generated. If the
copy to $(OcamlDir) is not complete at that point, the compiler will read
the partially copied file and complain about a "Corrupted compiled
interface". Searching $(ObjDir) first avoids this.
llvm-svn: 66217
2009-03-06 00:00:58 +00:00
Nick Lewycky
28c62d211a
Remove libtool.
...
llvm-svn: 65517
2009-02-26 07:44:16 +00:00
Duncan Sands
dc020f9c3c
Rename getABITypeSize to getTypePaddedSize, as
...
suggested by Chris.
llvm-svn: 62099
2009-01-12 20:38:59 +00:00
Gordon Henriksen
eeb6537abb
PR2731: C and Ocaml bindings for setTailCall and isTailCall.
...
Based on patch by Giorgos Korfiatis.
llvm-svn: 55570
2008-08-30 16:34:54 +00:00
Gordon Henriksen
d930f913e6
Rename some GC classes so that their roll will hopefully be clearer.
...
In particular, Collector was confusing to implementors. Several
thought that this compile-time class was the place to implement
their runtime GC heap. Of course, it doesn't even exist at runtime.
Specifically, the renames are:
Collector -> GCStrategy
CollectorMetadata -> GCFunctionInfo
CollectorModuleMetadata -> GCModuleInfo
CollectorRegistry -> GCRegistry
Function::getCollector -> getGC (setGC, hasGC, clearGC)
Several accessors and nested types have also been renamed to be
consistent. These changes should be obvious.
llvm-svn: 54899
2008-08-17 18:44:35 +00:00
Gordon Henriksen
72c1c7d694
Delete a redundant binding, LLVMHasInitializer.
...
Please use !LLVMIsDeclaration instead.
llvm-svn: 54572
2008-08-09 02:13:58 +00:00
Gordon Henriksen
2862ab967d
[PR-2610] Adding Ocaml bindings for Switch::addCase.
...
llvm-svn: 54571
2008-08-09 01:55:52 +00:00
Gordon Henriksen
5225cd66cf
Fix the LLVMCreateJITCompiler C binding.
...
Evan broke it in r54523 by adding a parameter in the implementation without
updating the header correspondingly.
llvm-svn: 54555
2008-08-08 20:49:28 +00:00
Gordon Henriksen
00889ccfca
Remove a duplicative binding. Patch by Mahadevan R.
...
llvm-svn: 51238
2008-05-19 05:47:10 +00:00
Duncan Sands
a07136ee2d
Merge LLVMBuilder and FoldingBuilder, calling
...
the result IRBuilder. Patch by Dominic Hamon.
llvm-svn: 49604
2008-04-13 06:22:09 +00:00
Erick Tryzelaar
4a0da98825
Expose Function::viewCFG and Function::viewCFGOnly to bindings.
...
llvm-svn: 48982
2008-03-31 16:22:09 +00:00
Erick Tryzelaar
8ac07c2834
Expose ExecutionEngine::getTargetData() to c and ocaml bindings.
...
llvm-svn: 48851
2008-03-27 00:27:14 +00:00
Gordon Henriksen
9859ab7283
Extend the builder interface to use the new instruction positioning code.
...
This adds support for instruction iterators, as well as rewriting the
builder code to use these new functions. This lets us eliminate the C
bindings for moving around the builder.
Patch by Erick Tryzelaar!
llvm-svn: 48774
2008-03-25 16:26:51 +00:00
Gordon Henriksen
76537e4251
Another typo.
...
llvm-svn: 48713
2008-03-23 22:52:51 +00:00
Gordon Henriksen
21c6a018b1
Fix a typo.
...
llvm-svn: 48712
2008-03-23 22:37:22 +00:00
Gordon Henriksen
07a45f4edb
Objective Caml bindings for basic block, function, global, and arg iterators.
...
llvm-svn: 48711
2008-03-23 22:21:29 +00:00
Gordon Henriksen
b81777a354
C and Objective Caml bindings for mem2reg and reg2mem.
...
Patch by Erick Tryzelaar.
llvm-svn: 48602
2008-03-20 17:16:03 +00:00
Gordon Henriksen
265f780c22
C and Objective Caml bindings for the various getParent methods of the IR.
...
Based on Erick Tryzelaar's patch.
llvm-svn: 48523
2008-03-19 01:11:35 +00:00
Bill Wendling
0d3970c839
Fix for "make install" of ocaml docs. Patch by Erick Tryzelaar!
...
llvm-svn: 48451
2008-03-17 07:49:23 +00:00
Gordon Henriksen
ab4b7d36cd
C and Objective Caml bindings for the TargetData class.
...
llvm-svn: 48422
2008-03-16 20:08:03 +00:00
Gordon Henriksen
82a0e74f43
C and Objective Caml bindings for several scalar transforms.
...
Patch originally by Erick Tryzelaar, but has been modified somewhat.
llvm-svn: 48419
2008-03-16 16:32:40 +00:00
Gordon Henriksen
878114bf16
C and Objective Caml bindings for PassManagers.
...
llvm-svn: 48413
2008-03-16 04:20:44 +00:00
Gordon Henriksen
c1338d430a
Minor documentation fix.
...
Patch by Erick Tryzelaar.
llvm-svn: 48382
2008-03-15 00:26:23 +00:00
Gordon Henriksen
6c6075e326
Expose Module::dump via C and Ocaml.
...
Patch by Erick Tryzelaar.
llvm-svn: 48379
2008-03-14 23:58:56 +00:00
Gordon Henriksen
c63aaeadd2
Expose Module::dump via C and Ocaml.
...
Patch by Erick Tryzelaar.
llvm-svn: 48378
2008-03-14 23:52:53 +00:00
Gordon Henriksen
962755dbf5
Refresh Makefile.ocaml in objdir if it is modified in srcdir.
...
Patch by Erick Tryzelaar!
llvm-svn: 48150
2008-03-10 16:15:32 +00:00
Gordon Henriksen
04e38cf30a
Refresh Makefile.ocaml in objdir if it is modified in srcdir.
...
Patch by Erick Tryzelaar!
llvm-svn: 48149
2008-03-10 15:58:40 +00:00
Gordon Henriksen
4486f8b5bb
Adding ocamldoc generation.
...
Patch by Erick Tryzelaar.
llvm-svn: 48147
2008-03-10 15:49:16 +00:00
Gordon Henriksen
17296876db
Formatting improvements.
...
llvm-svn: 48146
2008-03-10 15:47:03 +00:00
Gordon Henriksen
95f4b77b0d
This patch cleans up the OCaml bindings so that they format nicely with
...
ocamldoc. It does not yet hook into the build system, though.
Patch by Erick Tryzelaar!
llvm-svn: 48095
2008-03-09 07:17:38 +00:00
Gordon Henriksen
a49d435b27
Cleanup some comments in the OCaml bindings.
...
Patch by Erick Tryzelaar.
llvm-svn: 48014
2008-03-07 19:13:06 +00:00
Gordon Henriksen
67b619609c
Fix a typo. 'make clean' in bindings/ocaml would leave an output.
...
llvm-svn: 48012
2008-03-07 18:43:51 +00:00
Gordon Henriksen
099278e8f5
Fix a typo noticed by Erick Tryzelaar,
...
llvm-svn: 47886
2008-03-04 14:52:05 +00:00
Gordon Henriksen
db911e9037
Modify Makefile.rules to allow makefiles to prepend to C.Flags and
...
fiends. Change Makefile.ocaml to not touch CFLAGS.
llvm-svn: 45663
2008-01-06 21:54:35 +00:00
Gordon Henriksen
d829d2efeb
Fix a typo in llvm.mli noticed by Alain Frisch.
...
llvm-svn: 45585
2008-01-04 13:21:02 +00:00