Displaying 1 result from an estimated 1 matches for "fiobonacci".
Did you mean:
fibonacci
2010 Sep 03
6
[LLVMdev] Why clang inlines with -O3 flag and opt doesn't?
...;& opt -O3 fib.bc -o fib-opt.bc&& llvm-dis fib-opt.bc' resulting fib-opt.ll doesn't have any degree of inlining despite the flag -O3.
Why clang with the flag -O3 inlines code and opt with the same -O3 doesn't?
How can I make opt inline my .ll code the same way?
Yuri
--- fiobonacci fib.c example ---
#include<stdlib.h>
#include<stdio.h>
int fib(int AnArg) {
if (AnArg<= 2) return (1);
return (fib(AnArg-1)+fib(AnArg-2));
}
int main(int argc, char* argv[]) {
int n = atoi(argv[1]);
printf("fib(%i)=%i\n", n, fib(n));
}
--- my handcrafted fib.ll...