similar to: [LLVMdev] ocaml survey

Displaying 20 results from an estimated 200 matches similar to: "[LLVMdev] ocaml survey"

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
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
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 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
2008 Mar 16
2
[LLVMdev] improving the ocaml binding's type safety
Erick, 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 system involves annotating the C++ class hierarchy with extra variants which are unnecessary in
2008 Mar 15
0
[LLVMdev] improving the ocaml binding's type safety
Hi Erick, On 2008-03-15, at 04:03, Erick Tryzelaar wrote: > 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. I > think I got an easy solution with phantom types. This could be a good step. I'm not sure I can predict all of the implications; I'd suggest you work up a proof of concept.
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
2008 Mar 15
3
[LLVMdev] improving the ocaml binding's type safety
So just to compare, here are two different typesafe phantom type implementations. One is bottom down, the other bottom up. This is an example of the following functions: string Value::getName() bool Constant::isNull() bool GlobalValue::isDeclaration() bool GlobalVariable::isGlobalConstant() bool Function::isVarArg() Driver code: val make_constant : unit -> llconstant t val
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
2010 Feb 16
2
[LLVMdev] LLVM-OCaml Bindings Tutorial (2.6-2.7)
On Mon, Feb 15, 2010 at 11:47 PM, Jon Harrop <jon at ffconsultancy.com> wrote: > There are at least two other significant users of LLVM's OCaml bindings, > AFAIK. I'm writing an llvm backend/repl for felix, but it's pretty early. > My only gripe with LLVM's OCaml bindings is the way an error caught on the > LLVM side causes my program to die in a way that the
2010 Aug 17
0
[LLVMdev] Ocaml bindings in 2.8
Hello Jianzhou, On Sat, Aug 14, 2010 at 8:25 PM, Jianzhou Zhao <jianzhou at seas.upenn.edu> wrote: > 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. I usually wait until around nowish before a release to sync llvm-c and the ocaml bindings. I'll start the process.
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
2011 Jun 13
2
[LLVMdev] Reading Instructions from Ocaml
Hello, I'm interested in the OCaml bindings, but I've been digging through them and it doesn't seem possible to actually write a transformation with them. Specifically, there are a lot of functions to build each type of instruction, but there doesn't seem to be any way to query an llvalue and determine what kind of instruction it is. Is there something that I am missing? Thank
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
2011 Jun 14
0
[LLVMdev] Reading Instructions from Ocaml
On Mon, Jun 13, 2011 at 12:09 PM, Gregory Malecha <gmalecha at gmail.com> wrote: > Hello, Hello Gregory, > I'm interested in the OCaml bindings, but I've been digging through them and > it doesn't seem possible to actually write a transformation with them. > Specifically, there are a lot of functions to build each type of > instruction, but there doesn't seem
2007 Nov 26
4
[LLVMdev] Fibonacci example in OCaml
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 the invariants, then >> use the verifier as a
2007 Oct 19
0
[LLVMdev] OCaml Install Error
Hi, this looks very promising. Do you have any plans to add bindings for the use of an ExecutionEngine, especially recompileAndRelinkFunction? I've build an interactive toplevel implemented in OCaml and I have to pull of some stunts to be able to change the definition of a function. (emit a .ll file containing the code, looking up the function and calling removeBody, then reading
2010 Aug 18
0
[LLVMdev] a typo in OCaml bindings
Hi, revision 111418 binding/ocaml/llvm/llvm_ocaml.c /* llvalue -> int -> llvalue */ CAMLprim value llvm_params(LLVMValueRef Fn, value Index) { value Params = alloc(LLVMCountParams(Fn), 0); LLVMGetParams(Fn, (LLVMValueRef *) Op_val(Params)); return Params; } does not match the interface at binding/ocaml/llvm/llvm.ml external params : llvalue -> llvalue array =
2008 Mar 15
0
[LLVMdev] improving the ocaml binding's type safety
On Mar 15, 2008, at 17:49, Erick Tryzelaar wrote: > The other way is top down. This lets us extend our types, but > sacrifices some type safety, as we're saying that the arguments are > a superset of the variants. We can control this by limiting who can > create 't's: > > type 'a t > > type llvalue = [ `Value ] > type llconstant = [ llvalue |
2013 Jan 14
0
[LLVMdev] OCaml binding: error with the function "has_metadata"
Hi all, I am using the OCaml binding and I get the following error with the function "Llvm.has_metadata": Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file .../llvm-3.2.src/include/llvm/Support/Casting.h, line 208. Abort trap: 6 I am using the latest 3.2 release from the LLVM download page and this is a