similar to: [LLVMdev] LLVM-OCaml Bindings Tutorial (2.6-2.7)

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] LLVM-OCaml Bindings Tutorial (2.6-2.7)"

2010 Feb 16
0
[LLVMdev] LLVM-OCaml Bindings Tutorial (2.6-2.7)
On Tuesday 16 February 2010 03:51:00 Jianzhou Zhao wrote: > Does anyone know if there is any realistic project using LLVM-OCaml > Bindings? I've written a VM in OCaml built upon LLVM using LLVM's OCaml bindings: http://www.ffconsultancy.com/ocaml/hlvm/ There are at least two other significant users of LLVM's OCaml bindings, AFAIK. > How is the performance? Performance
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
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 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
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.
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
2010 Feb 17
1
[LLVMdev] LLVM-OCaml Bindings Tutorial (2.6-2.7)
On Tue, Feb 16, 2010 at 2:47 AM, Jon Harrop <jon at ffconsultancy.com> wrote: > On Tuesday 16 February 2010 03:51:00 Jianzhou Zhao wrote: >> Does anyone know if there is any realistic project using LLVM-OCaml >> Bindings? > > I've written a VM in OCaml built upon LLVM using LLVM's OCaml bindings: > >  http://www.ffconsultancy.com/ocaml/hlvm/ > > There
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
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.
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 |
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
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
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.
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
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 Feb 24
2
[LLVMdev] C Compiler written in OCaml, Pointers Wanted
On Wednesday 24 February 2010 03:58:03 Jianzhou Zhao wrote: > I think LLVM OCaml bindings do not support JIT too much. Can you elaborate on this? Several major projects are using OCaml's LLVM bindings to execute non-trivial code via JIT. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e
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
2007 Nov 25
2
[LLVMdev] Fibonacci example in OCaml
Here's my translation of the Fibonacci example into OCaml: open Printf open Llvm let build_fib m = let fibf = define_function "fib" (function_type i32_type [| i32_type |]) m in let bb = builder_at_end (entry_block fibf) in let one = const_int i32_type 1 and two = const_int i32_type 2 in let argx = param fibf 0 in set_value_name "AnArg" argx; let
2010 Feb 24
0
[LLVMdev] C Compiler written in OCaml, Pointers Wanted
On Wed, Feb 24, 2010 at 7:10 AM, Jon Harrop <jon at ffconsultancy.com> wrote: > On Wednesday 24 February 2010 03:58:03 Jianzhou Zhao wrote: >> I think LLVM OCaml bindings do not support JIT too much. > > Can you elaborate on this? I meant the OCaml bindings let OCaml call existing C++ LLVM routines, such as creating an execution engine, JIT-ing a function with existing JIT or
2009 Jan 04
3
[LLVMdev] HLVM
What happened to the HLVM project? I understand it was intended to be a high-level VM specifically for dynamic languages and this post indicates that it was integrated into the LLVM project last year: http://www.nabble.com/NEWS:-HLVM-merges-with-LLVM-td9627113.html But I cannot find any code in LLVM that looks like it would have come from HLVM. -- Dr Jon Harrop, Flying Frog Consultancy