Stefano Delli Ponti
2009-Sep-16 17:05 UTC
[LLVMdev] FYI: Phoronix GCC vs. LLVM-GCC benchmarks
Chris Lattner:> Comparing -O3 (and even -O4) is interesting, but we want all > optimization levels to perform better than GCC :). Lots of people use > -O2 and -Os, so comparing against other compiler's -O2 and -Os levels > is just as interesting as comparing -O3 vs -O3. >My thinking was that, for instance, -02 for GCC and -02 for LLVM(-GCC) do not necessarily mean the same thing, they may be not /commensurable/. But perhaps, my ignorance, you are saying that they _are_, that LLVM assigns the same types of optimizations as GCC to the different levels. Regards, Stefano
On Sep 16, 2009, at 10:05 AM, Stefano Delli Ponti wrote:> Chris Lattner: >> Comparing -O3 (and even -O4) is interesting, but we want all >> optimization levels to perform better than GCC :). Lots of people >> use -O2 and -Os, so comparing against other compiler's -O2 and -Os >> levels is just as interesting as comparing -O3 vs -O3. > > My thinking was that, for instance, -02 for GCC and -02 for LLVM(- > GCC) do not necessarily mean the same thing, they may be not / > commensurable/. > But perhaps, my ignorance, you are saying that they _are_, that LLVM > assigns the same types of optimizations as GCC to the different > levels.Right, we want them to be roughly comparable. O0 -> best debug experience, fastest compile times. O2 -> optimize without bloating the code too much and without burning *too* many cycles. O3 -> take more time and produce fatter code to get faster code. O1 is something of a wasteland with no clear purpose :) -Chris
Since we are in the area, what *should* O1 do? It's basically good for nothing, since it doesn't tune for size or performance. The only good I personally ever have for it is once in a while there is a miscompile at -O1 which narrows the problem. Would it be crazy to make -O1 equivalent to -Os? - Daniel On Wednesday, September 16, 2009, Chris Lattner <clattner at apple.com> wrote:> > On Sep 16, 2009, at 10:05 AM, Stefano Delli Ponti wrote: > >> Chris Lattner: >>> Comparing -O3 (and even -O4) is interesting, but we want all >>> optimization levels to perform better than GCC :). Lots of people >>> use -O2 and -Os, so comparing against other compiler's -O2 and -Os >>> levels is just as interesting as comparing -O3 vs -O3. >> >> My thinking was that, for instance, -02 for GCC and -02 for LLVM(- >> GCC) do not necessarily mean the same thing, they may be not / >> commensurable/. >> But perhaps, my ignorance, you are saying that they _are_, that LLVM >> assigns the same types of optimizations as GCC to the different >> levels. > > Right, we want them to be roughly comparable. > > O0 -> best debug experience, fastest compile times. > O2 -> optimize without bloating the code too much and without burning > *too* many cycles. > O3 -> take more time and produce fatter code to get faster code. > > O1 is something of a wasteland with no clear purpose :) > > -Chris > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Possibly Parallel Threads
- [LLVMdev] FYI: Phoronix GCC vs. LLVM-GCC benchmarks
- [LLVMdev] FYI: Phoronix GCC vs. LLVM-GCC benchmarks
- [LLVMdev] FYI: Phoronix GCC vs. LLVM-GCC benchmarks
- [LLVMdev] FYI: Phoronix GCC vs. LLVM-GCC benchmarks
- [LLVMdev] FYI: Phoronix GCC vs. LLVM-GCC benchmarks