[LLVMdev] dragonegg svn benchmarks

Duncan Sands baldrick at free.fr
Thu Oct 13 05:37:54 PDT 2011

Hi Jack,

>     IMHO, the more important thing is to fish out the remaining regressions
> in the llvm vectorization code by defaulting -fplugin-arg-dragonegg-enable-gcc-optzns
> on in dragonegg svn once llvm 3.0 has branched. Hopefully this will get us wider
> testing of the llvm vectorization support and some additional smaller test cases
> that expose the remaining bugs in that code.

turning on the GCC optimizers by default essentially means giving up on the LLVM
IR optimizers: one way of reading your benchmark results is that the LLVM IR
optimizers don't do anything useful that the GCC optimizers haven't done
already.  The fact that LLVM -O3 and -O2 don't produce better code than -O1
suggests that all that is needed is a little bit of optimization to clean up
the inevitable messy bits produced by the gimple -> LLVM IR conversion, but
that otherwise GCC already did all the interesting transforms.  Should this be
considered an LLVM bug or a dragonegg feature?

An LLVM bug: if the GCC optimizers work better than LLVM's then LLVM should be
improved until LLVM's are better.  Turning on the GCC optimizers by default just
hides the weaknesses of LLVM's optimizers, and reduces the pressure to improve

A dragonegg feature: users want their code to run fast.  Turning on the GCC
optimizers results in faster code, ergo the GCC optimizers should be turned
on by default.  That way you get faster compile times and fast code.

I have some sympathy for both viewpoints...

Ciao, Duncan.

More information about the llvm-dev mailing list