search for: llvm_bitwriter

Displaying 20 results from an estimated 30 matches for "llvm_bitwriter".

2010 Jun 27
0
[LLVMdev] ocaml bindings + ocamlbuild problem
Hello, I'm trying to use Llvm_bitwriter + ocamlbuild, but it doesn't recognize its dependency on Unix, so it doesn't compile. Minimal case: (* FILE: minimal.ml *) let main () = let m = Llvm.create_module (Llvm.global_context ()) "test" in ignore (Llvm_bitwriter.output_bitcode stdout m) ;; main () (* FILE: _tag...
2008 Oct 22
2
[LLVMdev] r57974 & r57976 for PR2888
...========================================================== > --- llvm/trunk/test/Bindings/Ocaml/bitreader.ml (original) > +++ llvm/trunk/test/Bindings/Ocaml/bitreader.ml Wed Oct 22 07:41:54 > 2008 > @@ -1,4 +1,4 @@ > -(* RUN: %ocamlc -warn-error A llvm.cma llvm_bitreader.cma > llvm_bitwriter.cma %s -o %t > +(* RUN: %ocamlc -warn-error A llvm.cma llvm_bitreader.cma > llvm_bitwriter.cma %s -o %t 2> /dev/null > * RUN: ./%t %t.bc > * RUN: llvm-dis < %t.bc | grep caml_int_ty > *) > > Modified: llvm/trunk/test/Bindings/Ocaml/bitwriter.ml > URL: http://llvm....
2007 Oct 02
2
[LLVMdev] OCaml Install Error
...read more about this? I assume (hope) the lib provides > some kind of OCaml bindings? I could not find any trace of it in > the 2.1 release source so I guess it's currently SVN only? Jan, Here's a trivial example. $ cat metahelloworld.ml (* metahelloworld.ml *) open Llvm open Llvm_bitwriter let _ = let filename = Sys.argv.(1) in let m = create_module filename in (* @greeting = global [14 x i8] c"Hello, world!\00" *) let greeting = define_global "greeting" (make_string_constant "Hello, world!" tru...
2009 May 28
0
[LLVMdev] [Cygwin] OCAML 'make check' failures
...ngs/Ocaml/a nalysis.ml -o analysis.ml.tmp 2> /dev/null child process exited abnormally FAIL: /home/ang/svn/llvm/test/Bindings/Ocaml/bitreader.ml Failed with exit(2) at line 1 while running: /usr/bin/ocamlc -cc g++ -I /home/ang/build/llvm/Debug/lib/ocaml - warn-error A llvm.cma llvm_bitreader.cma llvm_bitwriter.cma /home/ang/svn/llvm/t est/Bindings/Ocaml/bitreader.ml -o bitreader.ml.tmp 2> /dev/null child process exited abnormally FAIL: /home/ang/svn/llvm/test/Bindings/Ocaml/bitwriter.ml Failed with exit(2) at line 1 while running: /usr/bin/ocamlc -cc g++ -I /home/ang/build/llvm/Debug/lib/ocaml - warn-...
2007 Oct 02
0
[LLVMdev] OCaml Install Error
Hi, where can I read more about this? I assume (hope) the lib provides some kind of OCaml bindings? I could not find any trace of it in the 2.1 release source so I guess it's currently SVN only? greetings, Jan On 2. Okt 2007, at 12:22, Gordon Henriksen wrote: > On 2007-10-02, at 03:19, Gordon Henriksen wrote: > >> On Oct 2, 2007, at 00:17, Bill Wendling wrote: >>
2007 Nov 25
0
[LLVMdev] OCaml
...w methods is quite straightforward. If ocamlc is on your path, then 'configure; make; make install' should install the bindings in your ocaml lib. To link with them, compile your program with: ocamlopt -cc g++ The LLVM libraries currently bound are: llvm.cmxa / .cma llvm_bitwriter.cmxa / .cma llvm_analysis.cmxa / .cma Their .mli files and the corresponding llvm-c headers (coupled with an understanding of the C++ API) are presently the best reference. > I just rediscovered the OCaml bindings in bindings/ocaml (...). They > do indeed look quite complete but I...
2010 Mar 05
0
[LLVMdev] Last chance to get anything into llvm-c and ocaml bindings
...all I wanted to llvm-c and the > ocaml bindings for the soon to be released 2.7. Does anyone need any > other functions exposed before the code freeze on the 7th? Oh hey... I remember now. There is one thing I probably won't get around to doing myself until after the code freeze. (* Llvm_bitwriter *) val output_bitcode: out_channel -> Llvm.llmodule -> unit It would, of course, be awesome if you could get that into the 2.7 train. — j h woodyatt <jhw at conjury.org> http://jhw.vox.com/
2011 Apr 01
1
[LLVMdev] Fatal error
...mized --enable-assertions on Leopard with Ocaml 3.11, I get the following fatal error when it starts to build the ocaml docs. llvm[1]: Installing HTML documentation llvm[1]: Building ocamldoc documentation llvm[3]: Documenting llvm.odoc llvm[3]: Documenting llvm_bitreader.odoc llvm[3]: Documenting llvm_bitwriter.odoc llvm[3]: Documenting llvm_analysis.odoc llvm[3]: Documenting llvm_target.odoc llvm[3]: Documenting llvm_executionengine.odoc llvm[4]: Documenting llvm_scalar_opts.odoc Fatal error: exception Failure("There are two interfaces of module Llvm_analysis.") make[1]: *** [regen-ocamldoc] Er...
2010 Mar 04
4
[LLVMdev] Last chance to get anything into llvm-c and ocaml bindings
I've pretty much finished exposing all I wanted to llvm-c and the ocaml bindings for the soon to be released 2.7. Does anyone need any other functions exposed before the code freeze on the 7th?
2007 Oct 02
4
[LLVMdev] OCaml Install Error
On 2007-10-02, at 03:19, Gordon Henriksen wrote: > On Oct 2, 2007, at 00:17, Bill Wendling wrote: > >> I get this error duing a "make install": >> >> llvm[3]: Installing Debug /usr/local/lib/ocaml/libllvm.a >> install: /usr/local/lib/ocaml/libllvm.a: Permission denied >> make[3]: *** [install-a] Error 71 >> make[2]: *** [install] Error 1
2008 Dec 30
2
[LLVMdev] llvm ocaml bindings
...jority 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 Llvm_bitwriter. Is there something more specific you want to do? On Mon, Dec 29, 2008 at 6:05 PM, Ranjit Jhala <jhala at cs.ucsd.edu> wrote: > Hi Erick -- > > many thanks for writing the ocaml bindings and tutorial for LLVM ! > > I had a question: i see there are bindings for _generating_ co...
2007 Oct 19
0
[LLVMdev] OCaml Install Error
...s >> some kind of OCaml bindings? I could not find any trace of it in >> the 2.1 release source so I guess it's currently SVN only? > > Jan, > > Here's a trivial example. > > $ cat metahelloworld.ml > (* metahelloworld.ml *) > > open Llvm > open Llvm_bitwriter > > let _ = > let filename = Sys.argv.(1) in > let m = create_module filename in > > (* @greeting = global [14 x i8] c"Hello, world!\00" *) > let greeting = define_global "greeting" (make_string_constant >...
2008 Jul 31
2
[LLVMdev] Status of Ocaml bindings
...nt to 'char*' and FAIL: /home/erikd/Hack/SVN/llvm/test/Bindings/Ocaml/bitreader.ml Failed with unknown error (or has stderr output) at line 1 while running: /usr/bin/ocamlc.opt -cc g++ -I /home/erikd/Hack/SVN/llvm/Debug/lib/ocaml -warn-error A llvm.cma llvm_bitreader.cma llvm_bitwriter.cma /home/erikd/Hack/SVN/llvm/test/Bindings/Ocaml/bitreader.ml -o bitreader.ml.tmp /tmp/camlprim69f718.c:917: warning: deprecated conversion from string constant to 'char*' and so on. What is the status of these bindings? Are they supposed to be working? My system is Ubuntu Lin...
2007 Sep 17
0
[LLVMdev] C interface
...ocaml-bindings.patch (+936) ---------------------------===// bindings/ocaml/llvm bindings/ocaml/llvm/llvm.ml (+226) bindings/ocaml/llvm/llvm_ocaml.c (+394) bindings/ocaml/llvm/llvm.mli (+168) bindings/ocaml/llvm/Makefile (+24) bindings/ocaml/bitwriter bindings/ocaml/bitwriter/llvm_bitwriter.mli (+18) bindings/ocaml/bitwriter/bitwriter_ocaml.c (+31) bindings/ocaml/bitwriter/llvm_bitwriter.ml (+18) bindings/ocaml/bitwriter/Makefile (+23) bindings/ocaml/Makefile (+13) bindings/README.txt (+3) bindings/Makefile (+18) Adds ocaml language bindings to LLVM. They are built...
2007 Nov 25
2
[LLVMdev] Fibonacci example in OCaml
...ild_fib m in let main = define_function "main" (function_type i32_type [| |]) m in let at_entry = builder_at_end (entry_block main) in let n = build_call fib [| const_int i32_type 40 |] "" at_entry in ignore (build_ret (const_null i32_type) at_entry); if not (Llvm_bitwriter.write_bitcode_file m filename) then exit 1; dispose_module m let () = match Sys.argv with | [|_; filename|] -> main filename | _ as a -> eprintf "Usage: %s <file>\n" a.(0) I'd appreciate it if someone could gloss over this and let me know if I'm going in the...
2007 Nov 25
9
[LLVMdev] OCaml
Hi! I just took another look at the LLVM project and it has come along in leaps and bounds since I last looked. I've been working through the (awesome!) tutorial and am now really hyped about the project. I am particularly interested in using LLVM to write compilers for OCaml-like languages in OCaml-like languages. This requires some core functionality that would be generically useful:
2007 Nov 25
5
[LLVMdev] OCaml
...If ocamlc is on your path, then 'configure; make; make install' should > install the bindings in your ocaml lib. To link with them, compile > your program with: > > ocamlopt -cc g++ > > The LLVM libraries currently bound are: > > llvm.cmxa / .cma > llvm_bitwriter.cmxa / .cma > llvm_analysis.cmxa / .cma > > Their .mli files and the corresponding llvm-c headers (coupled with an > understanding of the C++ API) are presently the best reference. Right. I hadn't noticed they were already installed after llvm "make install" in:...
2007 Nov 26
0
[LLVMdev] Fibonacci example in OCaml
...str "%d\n") [| int 0; int 0 |] "int_spec" bb in let vars = List.fold_left (defn m) [] program in let n, _ = expr { fn = main; blk = blk; vars = vars } run in build_call print [| int_spec; n |] "" bb |> ignore; build_ret (int 0) bb |> ignore; if not (Llvm_bitwriter.write_bitcode_file m filename) then exit 1; dispose_module m let () = match Sys.argv with | [|_; filename|] -> main filename | _ as a -> Printf.eprintf "Usage: %s <file>\n" a.(0) Compile with: $ ocamlc -dtypes -pp camlp4oof -I +camlp4 dynlink.cma camlp4lib.cma -cc g+...
2007 Nov 25
1
[LLVMdev] OCaml bindings
...a null terminated string > instead (nasty hack). const_stringz null-terminates the string. But adding \000 in the literal as you did is equivalent. > My code is: > > [...] > > To use it I just do: > > $ ocamlopt -dtypes -cc g++ -I /usr/local/lib/ocaml/ llvm.cmxa > llvm_bitwriter.cmxa hellow.ml -o hellow > $ ./hellow run.bc > > How do I compile straight to native code without going via C? -march=c invokes a very unusual LLVM target which emits C code instead of assembly. Read http://llvm.org/cmds/llc.html and llc --help. Here: > $ llc -f -march=c run.bc -o r...
2008 Dec 14
1
[LLVMdev] Tail calls from OCaml
How do you get a tail call using the OCaml's LLVM API? -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e