[LLVMdev] Why clang inlines with -O3 flag and opt doesn't?
baldrick at free.fr
Fri Sep 3 03:17:39 CDT 2010
> 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 fib-opt.ll doesn't have any degree of inlining despite the flag -O3.
perhaps because your hand written .ll has no target information in it.
I'm not sure why that would effect inlining, but in general it vastly
reduces the number of optimizations that can be performed.
More information about the LLVMdev