similar to: [LLVMdev] OCaml binding: error with the function "has_metadata"

Displaying 20 results from an estimated 200 matches similar to: "[LLVMdev] OCaml binding: error with the function "has_metadata""

2008 Dec 31
0
[LLVMdev] llvm ocaml bindings
Hi, thanks Chris and Gordon for the fantasic infrastructure and ocaml bindings and Erick for the prompt response! I'm looking to use LLVM to write program analyses for C/C++ programs, but to use Ocaml to write the analyses. I did see there were bindings for iterating over: * functions in a module [iter_functions] * basic blocks in a functions [iter_blocks] * instructions in a block
2011 Jun 11
0
[LLVMdev] Kaleidoscope Build Error
(cc'ing llvm-dev) Hello Gregory, i just recompiled llvm from scratch, and was able to build the ocaml kaleidoscope bindings. Did you know the llvm's build system already can compile the kaleidoscope tutorials for you? You can run this to build them: make BUILD_EXAMPLES=1 Or just cd into the examples directory in your build directory, and run "make" there. Anyway, I think the
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 Dec 30
2
[LLVMdev] llvm ocaml bindings
(ccing llvmdev) Hi Ranjit! I only ported Chris's tutorial and Gordon did the vast majority of the bindings, so they deserve most of the praise. I believe there are techniques for walking over the CFG. You can load up code using Llvm_bitreader, use things like Llvm.iter_globals, Llvm.iter_functions, and Llvm.iter_instrs to walk over the module, and write out a new llmodule using
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 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 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.
2017 Mar 08
2
LLVMGetBitcodeModuleInContext2 problem
I'm trying to use LLVMGetBitcodeModuleInContext2 to load a .bc file. However, it's not working. The code looks something like this: void llvm_load_IR_library(char *path) { LLVMContextRef global_context; LLVMMemoryBufferRef module_path; LLVMModuleRef ir_lib_module; bool flag; module_path = LLVMCreateMemoryBufferWithMemoryRange(path, strlen(path),
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
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 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
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
2017 Mar 09
2
LLVMGetBitcodeModuleInContext2 problem
Oops, missed initializing some stuff. Added: LLVMLinkInMCJIT(); LLVMInitializeNativeTarget(); LLVMInitializeNativeAsmPrinter(); LLVMInitializeNativeAsmParser(); Now it crashes in LLVMGetFunctionAddress(). Hmm. On Wed, Mar 8, 2017 at 5:14 PM, Toshiyasu Morita <toshi at tensyr.com> wrote: > Made it a bit further. Here's the current code: > >
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.
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
2005 Aug 20
5
asterisk is working bad
Dear readers, under xen 2.0.5, kernel 2.6.11.4-20a-xen (both suse 9.3) asterisk 1.0.9 could''t replay its sounds. Its sounds very brocken. Without xen it works fine. Would somebody help pls? best regards Stefan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
2017 Feb 21
3
What is the proper usage of LLVMContext?
Hi, I'm Ryo Ota. I have two questions about `llvm::LLVMContext`. Q1) What is the difference between the following (A)`my_context` and (B)`global_context`? Do I have to create a LLVMContext by myself? Or use `getGlobalContext()`? Could you tell me what situation needs a LLVMContext which is created by myself such as (A)? (A) { llvm::LLVMContext my_context; // codes using only my_context (get