[LLVMdev] -fplugin-arg-dragonegg-enable-gcc-optzns impact

Duncan Sands baldrick at free.fr
Fri Apr 15 07:51:23 PDT 2011

Hi Jack,

>     This gets even more interesting.
> de-gcc45 -fomit-frame-pointer -O3                                            205.738266
> de-gcc45 -fomit-frame-pointer -O3 -fplugin-arg-dragonegg-enable-gcc-optzns   267.066124
> de-gcc45 -fomit-frame-pointer -O2                                            206.015974
> de-gcc45 -fomit-frame-pointer -O2 -fplugin-arg-dragonegg-enable-gcc-optzns   276.676232
> gcc-fsf-4.5 -fomit-frame-pointer -O2                                         239.868551
> gcc-fsf-4.6 -fomit-frame-pointer -O2                                         248.147753
> llvm-clang -fomit-frame-pointer -O2                                          226.756189
> So the enhancement from -fplugin-arg-dragonegg-enable-gcc-optzns doesn't appear due
> to optimizations added between -O2 and -O3. It also is interesting that -O2 outperforms
> -O3 with -fplugin-arg-dragonegg-enable-gcc-optzns. I assume that the llvm and FSF gcc
> optimizations must be at cross purposes somewhere there.

it would be nice to have a way of specifying different -O levels for the GCC and
the LLVM parts.  Actually you can get this (awkwardly) by using (say) -O3 on the
gcc command line but disabling LLVM optimizations using
-fplugin-arg-dragonegg-disable-llvm-optzns; using
-fplugin-arg-dragonegg-emit-ir (and -S) to output bitcode; running "opt -O1" (or
whatever LLVM optimization level you want) on the bitcode; then using llc to
codegen it.

Ciao, Duncan.

More information about the llvm-dev mailing list