Displaying 20 results from an estimated 800 matches similar to: "[LLVMdev] a typo in OCaml bindings"
2010 Dec 22
0
[LLVMdev] the optional function return attribute and the llvm-c bindings
On Dec 21, 2010, at 11:33, james woodyatt wrote:
> On Dec 21, 2010, at 00:43, Duncan Sands wrote:
>>
>> IIRC the function return value is considered to be the parameter with index 0.
>> The function itself is considered to be the parameter with index ~0U.
>
> Yes, that's what the documentation seems to say is the proper mode for indexing the return parameter, but
2010 Oct 25
0
[LLVMdev] Ocaml bindings for execution engines
Hi All,
Here is the code from bindings/ocam/executionengine/executionengine_ocaml.c.
/* llvalue -> GenericValue.t array -> ExecutionEngine.t -> GenericValue.t */
CAMLprim value llvm_ee_run_function(LLVMValueRef F, value Args,
LLVMExecutionEngineRef EE) {
unsigned NumArgs;
LLVMGenericValueRef Result, *GVArgs;
unsigned I;
NumArgs =
2010 Feb 28
2
[LLVMdev] Tag number of OCaml Variant in executionengine
Hi,
At the code below from
./bindings/ocaml/executionengine/executionengine_ocaml.c,
we create an OCaml Variant from C. It is from 2.6, the latest 2.7 has
the same code.
Line 240 Option = alloc(1, 1) assigns tag1 to the 'some' constructor.
In term of http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html,
I think the 'some' should have a tag 0. We dont have a runtime error
for
2008 Mar 04
0
[LLVMdev] [PATCH] Cleanup the c and ocaml binding documentation.
Hi Erick,
Thanks, this looks good. Can you please resubmit this patch, and the
others, as an attachment?
On Mar 4, 2008, at 03:19, Erick Tryzelaar wrote:
> ---
> bindings/ocaml/llvm/llvm.ml | 2 +-
> bindings/ocaml/llvm/llvm.mli | 2 +-
> bindings/ocaml/llvm/llvm_ocaml.c | 2 +-
> include/llvm-c/Core.h | 32 ++++++++++++++++++
> +-------------
2010 Dec 21
2
[LLVMdev] the optional function return attribute and the llvm-c bindings
On Dec 21, 2010, at 00:43, Duncan Sands wrote:
>
> IIRC the function return value is considered to be the parameter with index 0.
> The function itself is considered to be the parameter with index ~0U.
Yes, that's what the documentation seems to say is the proper mode for indexing the return parameter, but when I set an attribute on the parameter with index zero, it gets applied to
2012 Apr 25
0
[LLVMdev] Crash in JIT
Hi David,
I'm not certain, but to me the "LLVMSetTarget(module, "i686-apple-darwin11");" line looks suspicious. I'm not familiar with all the ins and outs of how target triples get handled, but it looks to me like that's requesting 32-bit code.
I think that if you omit that line completely then the target will be inferred from the execution environment. My best
2012 Apr 25
2
[LLVMdev] Crash in JIT
Hello,
[Using LLVM r155315, according to `svn log | head`]
I am experimenting with programatically building and jitting functions in a module, and I seem to be coming across a crash in some generated code. Using the llvm-c interface I build up the module which dumps like this:
; ModuleID = 'MyModule'
target datalayout = "i686-apple-darwin11"
target triple =
2010 Aug 15
4
[LLVMdev] Ocaml bindings in 2.8
Hi,
Does 2.8 release plan to change anything in Ocaml bindings?
http://llvm.org/docs/ReleaseNotes.html#whatsnew does not list any
relevant features.
2.7 added 'operand' that can access each operand from a value.
external operand : llvalue -> int -> llvalue = "llvm_operand"
Does this binding also expose a primitive to return how many operands
a given value has?
I need
2008 Mar 16
0
[LLVMdev] improving the ocaml binding's type safety
On Sat, Mar 15, 2008 at 7:33 PM, Gordon Henriksen
<gordonhenriksen at mac.com> wrote:
> After some experimentation, I'd prefer the closed system. LLVM has some type
> peculiarities like the commonality between CallInst and InvokeInst. I find
> that the closed type system lets me express such constraints more naturally.
> Expressing these constraints explicitly in the open
2008 Mar 04
1
[LLVMdev] [PATCH] Cleanup the c and ocaml binding documentation.
---
bindings/ocaml/llvm/llvm.ml | 2 +-
bindings/ocaml/llvm/llvm.mli | 2 +-
bindings/ocaml/llvm/llvm_ocaml.c | 2 +-
include/llvm-c/Core.h | 32 +++++++++++++++++++-------------
4 files changed, 22 insertions(+), 16 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 316a84e85ed2363551149e65a227c8e7c8192624.diff
Type:
2017 Jan 25
2
mcjit C interface problems
Hi, I'm attempting to use MCJIT with the C interface with llvm-3.9.0, and
it doesn't seem to work. This code is derived from Paul Smith's example
code:
int main(int argc, char const* argv[]) {
LLVMModuleRef mod = LLVMModuleCreateWithName("my_module");
LLVMTypeRef param_types[] = {LLVMInt32Type(), LLVMInt32Type()};
LLVMTypeRef ret_type =
2010 Dec 21
2
[LLVMdev] LLVM installation in Windows
Hi everyone,
I am new in this field. I am trying to install LLVM in my 32-bit Windows XP. Can anyone please give a to do list for installing LLVM in my machine. When trying to build LLVM, I get the following error:
llvm[3]: Compiling llvm_ocaml.c for Debug build
In file included from D:\Program Files\Objective Caml\lib/caml/misc.h:24,
from D:\Program
2010 Feb 18
0
[LLVMdev] ocaml survey
On Thursday 18 February 2010 20:51:40 Erick Tryzelaar wrote:
> I'm in the process of finishing up the ocaml llvm bindings, and I had
> some last minute questions before we code freeze:
>
> 1. What version of ocaml is everyone using, and how old of an ocaml
> version do you need to support?
I'm on OCaml 3.11.1 but I have no preferences.
> 2. Would it be alright if I
2010 Feb 19
0
[LLVMdev] ocaml survey
On Feb 18, 2010, at 12:51, Erick Tryzelaar wrote:
>
> I'm in the process of finishing up the ocaml llvm bindings, and I had
> some last minute questions before we code freeze:
>
> 1. What version of ocaml is everyone using, and how old of an ocaml
> version do you need to support?
Still using OCaml 3.11.1, but will but upgrading to OCaml 3.11.2 around the same time as the
2010 Feb 18
6
[LLVMdev] ocaml survey
I'm in the process of finishing up the ocaml llvm bindings, and I had
some last minute questions before we code freeze:
1. What version of ocaml is everyone using, and how old of an ocaml
version do you need to support?
2. Would it be alright if I renamed some functions? Module providers
are being removed for 2.7. I can keep the old functions around, but
I'd prefer to keep the API clean.
2007 Nov 27
0
[LLVMdev] Fibonacci example in OCaml
On Monday 26 November 2007 20:05, Gordon Henriksen wrote:
> On Nov 26, 2007, at 14:18, Jon Harrop wrote:
> > On Monday 26 November 2007 16:21, Gordon Henriksen wrote:
> >> Unfortunately, even if the bindings were more strongly typed, it
> >> would still be structurally possible to build invalid LLVM code, so
> >> you've just got to take care not to violate
2010 Sep 08
0
[LLVMdev] Compiling Errors in LLVM ocaml Bindings
Hi, Everyone,
I got a error when I try to compile LLVM 2.7, it is located in the ocaml
bindings file, showing like:
llvm[2]: Compiling llvm_ocaml.c for Release+Asserts build
In file included from C:\Objective Caml\lib/caml/misc.h:24,
from C:\Objective Caml\lib/caml/alloc.h:23,
from /home/leila/llvm/bindings/ocaml/llvm/llvm_ocaml.c:19:
In file included from
2007 Nov 27
1
[LLVMdev] Fibonacci example in OCaml
On 2007-11-26, at 21:12, Jon Harrop wrote:
> Provide a type enumerating the valid terminators and restrict the
> last instruction in a block to be a terminator. Something like this:
>
> type terminator = [ `ret of llvalue | `br of llvalue ]
> type instruction =
> [ terminator
> | `add of llvalue * llvalue
> | `sub of llvalue * llvalue ]
> type block
2008 Mar 15
4
[LLVMdev] improving the ocaml binding's type safety
I was talking to Gordon on #llvm earlier, and he challenged me with
coming up with a way to improve the ocaml binding's type safety. We
can't go letting haskell beat us now, can we? I think I got an easy
solution with phantom types.
For those who don't know what the problem is, the ocaml bindings share
one type between whole class branches (like values). This means we
need to downcast
2010 Sep 07
2
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
I have created the function prototype with the following code:
const uintmax_t methodNameSize = 1024;
const char methodNameTemplate[] = "llvm.memcpy.p0i%llu.p0i%llu.i%llu";
char methodName[methodNameSize];
// Create the methodName.
memset(methodName, 0, methodNameSize);
sprintf(methodName, methodNameTemplate,
dstSize,
srcSize,
lengthSize);
// Search for the