similar to: [LLVMdev] JIT API example (fibonacci)

Displaying 20 results from an estimated 700 matches similar to: "[LLVMdev] JIT API example (fibonacci)"

2004 Aug 17
5
[LLVMdev] JIT API example (fibonacci)
On Tue, 17 Aug 2004, Reid Spencer wrote: > That's pretty cute actually. Do you want this "brilliant" :) example in the cvs > repository? I'd be happy to put it in. Here's an idea: how about we take the ModuleMaker, Valery's previous example, and this one and put them all in one "small examples" project? -Chris > Valery A.Khamenya wrote: > >
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
Valery, That's pretty cute actually. Do you want this "brilliant" :) example in the cvs repository? I'd be happy to put it in. Reid. Valery A.Khamenya wrote: > Hi LLVMers, > > the example attached I have used to prove that JIT and some visible > optimizations are really invoked. > > Proved OK. I got 30% speed-up in comparison to gcc 3.3.3 >
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
On second thought, the makefiles don't (easily) allow this do they? You can only build one program per directory. Were you suggesting that you wanted me to move the entire directories under a "small examples" directory? Reid. Chris Lattner wrote: > On Tue, 17 Aug 2004, Reid Spencer wrote: > > >>That's pretty cute actually. Do you want this
2004 Aug 18
1
[LLVMdev] JIT API example (fibonacci)
On Tue, 17 Aug 2004, Reid Spencer wrote: > On second thought, the makefiles don't (easily) allow this do they? You can > only build one program per directory. Were you suggesting that you wanted me to > move the entire directories under a "small examples" directory? You're right. The simples way to do this would be to have: projects/ SmallExamples/
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
On Wed, 18 Aug 2004, Valery A.Khamenya wrote: > the example attached I have used to prove that JIT and some visible > optimizations are really invoked. > > Proved OK. I got 30% speed-up in comparison to gcc 3.3.3 > on my Athlon XP 1500. Cool! Hey Valery, before we add this to the CVS repo, can you take a look at some of the changes I made to your HowToUseJIT example and
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
2004 Aug 09
0
[LLVMdev] API on JIT, code snippets
Reid wrote: > I have to agree with Misha on this. None of us knows "everything" about > LLVM and as you can see, Misha responded three hours before I did :). > Asking questions here is encouraged, so please feel free to post them on > LLVMdev. We'll always help where we can. well, OK :) Please find the attachment with the first approach to such an example i've
2004 Aug 09
3
[LLVMdev] API on JIT, code snippets
Valery, I have to agree with Misha on this. None of us knows "everything" about LLVM and as you can see, Misha responded three hours before I did :). Asking questions here is encouraged, so please feel free to post them on LLVMdev. We'll always help where we can. Thanks, Reid. On Mon, 2004-08-09 at 06:37, Misha Brukman wrote: > On Mon, Aug 09, 2004 at 12:32:33PM +0400, Valery
2004 Aug 09
5
[LLVMdev] API on JIT, code snippets
Valery, Attached are three files: "valery.cpp" which contains your original, "reid.cpp" which contains corrections to most of the FIXME items and "diffs" which shows the differences between them. The differences should be instructive on what to do. You were really, really close .. just a few details changing. The code in "reid.cpp" compiles but I
2007 Jan 23
0
[LLVMdev] Semi-random crashes seemingly related to Arguments
On Mon, 22 Jan 2007, Marcel Weiher wrote: > I've been having somewhat semi-random crashes that seem to be related > to my use of Argument objects, usually when I then try to use them for > processing, for examples in a CallInst. Your code looks pretty reasonable to me. The only thing to be aware of is that varargs functions will have fewer Argument nodes than calls to the
2007 Jan 23
2
[LLVMdev] Semi-random crashes seemingly related to Arguments
I've been having somewhat semi-random crashes that seem to be related to my use of Argument objects, usually when I then try to use them for processing, for examples in a CallInst. Do I need to copy or wrap the Argument if I want to use it as a Value? Or can I just use the reference that I am getting (multiple times)? I think there is probably something very fundamental about the
2004 Aug 09
1
[LLVMdev] API on JIT, code snippets
Valery, First response of several. I don't know why the demo page at UIUC is unavailable but there is an enhanced copy of it running on the mirror at http://llvm.x10sys.com/demo/ if you ever need it. Running it produced the following LLVM equivalent for the C code in your example. implementation ; Functions: int %add1(int %x) { entry: %tmp.1 = add int %x, 1 ; <int> [#uses=1]
2004 Aug 12
1
[LLVMdev] I got problem in BranchInst+SetCondInst
Hi all, the small test modeling my problem is attached. (see comments in file attached) the problem is that both SetCondInst* CondInst = new SetCondInst( Instruction::SetLE, One, Two ); and SetCondInst* CondInst = new SetCondInst( Instruction::SetLE, Two, One ); have the same output... Anyone have a sharper eye?.. --- Valery A.Khamenya -------------- next part
2004 Aug 09
0
[LLVMdev] API on JIT, code snippets
On Mon, 9 Aug 2004, Reid Spencer wrote: > Attached are three files: "valery.cpp" which contains your original, "reid.cpp" > which contains corrections to most of the FIXME items and "diffs" which shows > the differences between them. The differences should be instructive on what to > do. You were really, really close .. just a few details changing. The
2004 Aug 10
0
[LLVMdev] API on JIT, code snippets
Reid Spencer, thank you for your quick responce, finally i got to my PC at home. You wrote: > Attached are three files: "valery.cpp" which contains your original, > "reid.cpp" which contains corrections to most of the FIXME items and > "diffs" which shows the differences between them. The differences > should be instructive on what to do. You were
2007 Nov 25
2
[LLVMdev] How to declare and use sprintf
So my Fib program is segfaulting and I'm not sure why. I think it might be because my declaration and use of sprintf is wrong. I notice llvm-gcc produces declarations containing "..." like: declare int %printf(sbyte*, ...) but I'm not sure how to do this so I've used: let sprintf = declare_function "sprintf" (function_type (pointer_type
2007 Nov 26
0
[LLVMdev] How to declare and use sprintf
On Nov 25, 2007, at 18:53, Jon Harrop wrote: > So my Fib program is segfaulting and I'm not sure why. I think it > might be because my declaration and use of sprintf is wrong. > > I notice llvm-gcc produces declarations containing "..." like: > > declare int %printf(sbyte*, ...) > > What is the correct way to do this? The type you want is: let sp =
2007 Nov 26
1
[LLVMdev] How to declare and use sprintf
On Monday 26 November 2007 00:40, Gordon Henriksen wrote: > The type you want is: > > let sp = pointer_type i8_type in > var_arg_function_type sp [| sp; sp |] Awesome stuff. Here is my most elegant Fibonacci example in OCaml so far: open Llvm let ( |> ) x f = f x let int n = const_int i32_type n let return b x = build_ret x b |> ignore let build_fib m = let ty =
2011 Jun 18
1
[LLVMdev] loop only executes once
Hello, I'm trying to get to grips with the c interface of llvm intending to eventually develop a front end for Purebasic Though I've hit the wall already writing an iterative Fibonacci function. While I think the module dump looks ok it doesn't work for any input > 2 the function returns 2, the loop only executes once Hopefully someone can see what the problem is from the
2012 Apr 09
2
[LLVMdev] How to instrument a this function using insertBefore instruction???
Hi, I don't think the code you pasted can be the correct code, where does FibF come from? Anyway, the problem is that you're calling the FibF from Module A, however you defined it for Module B. You need to insert the FibF function into the Module that you're running. To do this override "virtual bool doInitialization(Module &M);" and insert FibF into M. Joey 2012/4/9