similar to: [LLVMdev] llvm hangs: fibonacci numbers, recursive

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] llvm hangs: fibonacci numbers, recursive"

2010 Mar 09
1
[LLVMdev] llvm hangs: fibonacci numbers, recursive
Elmar, As Chris mentioned below, please don't contact individual developers, but email llvmdev instead. For your specific question, which you asked on March 3rd, there was a response posted the same day -- did you see it? If you visit the link you provided below, at the bottom of the page is the "Next message" link which will show you the response:
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
2011 Apr 08
1
R and lazy evaluation
Haskell is the prototypical lazy evaluation language. One can compute a Fibonacci sequence by the Haaskell equivalent of the following R code. > fibs <- c(0, 1, rep(0, 8)) > fibs[3:10] <- fibs + fibs[-1] This works as follows. fibs = 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 fibs = 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 When one adds fibs to fibs[-1], one is effectively adding diagonally: fibs[3] <-
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
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 >
2007 Nov 26
0
[LLVMdev] Fibonacci example in OCaml
Here is a complete 104-line native code compiler for a tiny subset of OCaml that is expressive enough to compile an external Fibonacci program: type expr = | Int of int | Var of string | BinOp of [ `Add | `Sub | `Leq ] * expr * expr | If of expr * expr * expr | Apply of expr * expr type defn = | LetRec of string * string * expr open Camlp4.PreCast;; let expr = Gram.Entry.mk
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/
2013 Oct 03
0
[LLVMdev] libclang JIT frontend
Hi, I'm not sure if this is a libclang, llvm::cl or clang-interpreter issue so I'll try posting here for a response. I am using libclang as a frontend to the LLVM JIT (3.3 release). I started from the clang-interpreter example and have everything working (given a C/C++ source file I can have it JIT'd to memory and executed) for a single run. When I try to compile a second source
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: > >
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
2007 Nov 26
2
[LLVMdev] Fibonacci example in OCaml
On Nov 26, 2007, at 00:47, Jon Harrop wrote: > Here is a complete 104-line native code compiler for a tiny subset > of OCaml that is expressive enough to compile an external Fibonacci > program: > > [...] > > I was kind of hoping that function pointers would just magically > work, so this: > > do (if 1 <= 2 then fib else fib) 40 > > would run, but
2014 May 08
3
[LLVMdev] Small problem with the tail call elimination pass
Hello everybody, On the documentation page for the tailcallelim pass you can read: "This pass transforms functions that are prevented from being tail recursive by an associative expression to use an accumulator variable, thus compiling the typical naive factorial or fib implementation into efficient code” However, I don’t see this behavior when trying to compile this variant of the
2011 Oct 04
2
[LLVMdev] inlining of recursive functions
Hello, In lib/Analysis/InlineCost.cpp, inlining of recursive functions is disabled because it is like loop unrolling. But - I could not find a way to have loop unrolling do the job - In the context of functionnal languages (I am implementing one), inlining small recursive functions is often a great gain My question is what is the cleanest and simplest way to inline small recursive functions ?
2010 Sep 03
6
[LLVMdev] Why clang inlines with -O3 flag and opt doesn't?
When I compile my C fibonacci example fib.c with 'clang -O3 -c -emit-llvm -o fib-clang.bc fib.c&& llvm-dis fib-clang.bc' I get fib-clang.ll that has some degree of inlining in it. But when I get an equivalent to fib.c file fib.ll and run it through opt with the command 'llvm-as fib.ll&& opt -O3 fib.bc -o fib-opt.bc&& llvm-dis fib-opt.bc' resulting
2004 Aug 17
4
[LLVMdev] JIT API example (fibonacci)
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 on my Athlon XP 1500. Nice. P.S. guys, no fears, I don't plan to flood the cvs repository with my "brilliant" examples ;) --- Valery A.Khamenya -------------- next part -------------- An
2011 Apr 20
5
Fibonacci
Hi! I am trying to work out the code to get a Fibonacci sequence, using the while() loop and only one variable. And I can't figure it out. Fibonacci<-c(1,1) while (max(Fibonacci)<500){ Fibonacci<-c(Fibonacci, (max(Fibonacci) + ?(Fibanacci))) } How can I tell R to take the value one before the max value? (Without defining another variable) (Probably super easy... I am a
2010 Apr 29
2
[LLVMdev] Why the same code is much slower in JIT compared to separate executable?
I run the same simple Fibonacci computing code in JIT and as a native executable. I see that with argument 45 JIT runs for 11.3sec and executable runs for 7.5sec. Why there is such difference? Yuri -------- fib.ll -------- ; ModuleID = 'all.bc' @.str = private constant [12 x i8] c"fib(%i)=%i\0A\00", align 1 ; <[12 x i8]*> [#uses=1] define i32 @fib(i32 %AnArg) {
2004 Jan 08
1
[LLVMdev] Re: idea 10
Hi Valery, Valery A.Khamenya wrote: >>To me this appears more as an algorithmic design issue, this function >>could be rewritten in "continuation passing style", and each >>continuation could be distributed by a load-balancing strategy to the >>computers sharing CPU resources. Using mechanisms such as "futures" (as >>in Mozart) allows to do
2004 Aug 13
3
[LLVMdev] is this code really JITed and/or optimized ? ..
Hi all, (thanks to Reid, who gave nice advice) the fibonacci function code works now. Please find attached file. but... the performance is adequate, say, for byte-code interpretation mode and not for optimized JITing. fibonacci function of 35 from attached file is more then 100 times slower then the following code compiled with "gcc -O2" : ----------- #include <iostream> int