[LLVMdev] Which is the better optimization?

Seung Jae Lee lee225 at uiuc.edu
Tue Mar 11 17:36:14 PDT 2008


Hello, LLVMers.

While making some bitcodes from HL source codes including loops, I came to wonder which was the better one for the optimization between:

   llvm-gcc -O4 .... (using llvm-gcc optimization)

and

   llvm-gcc -O0 .... (nonoptimization of llvm-gcc)
   opt -mem2reg -instcombine -indvars .... (w/ optimization pass)

After some trials, 'llvm-gcc -O4' seemed better for optimization but not sure.

Bitcodes from 'llvm-gcc -O0' w/ 'opt' were quite neat so easy to read and sometimes used less basic blocks than that from 'llvm-gcc -O4' trial.

I am not sure about this, is there any body familiar with this? :^)

Thanks,
Seung



More information about the llvm-dev mailing list