LLVM and Spec2006


What are the best options to compile Spec2006 with LLVM compilers to get the best performance numbers on x86?

Has anybody compared LLVM Spec2006 numbers with GCC 4.5 base?


Hi Reza,

-O4 is the highest level of LLVM optimization that I know of. But, I don't know
if it has been tried on Spec2006. IIRC, Dan Gohman has run Spec. tests with LLVM,
so he can provide more info.

- fariborz

Hi Reza, this has been done by Vladimir Makarov, as described here:

Best wishes,


-O4 does give good additional performance compared to -O3 with llvm. The additional inlining opportunities and such add up quite a bit. The SPEC2006 runs I've done have all been within the framework of the llvm test suite, the LTO is run directly, rather than via an explicit -O4 option. The test-suite Makefiles themselves are probably the best place to look for the details of how that works if you're interested. SPEC2006 is hooked in via the Externals tests.


Hi Jim,

did you do any testing of the fortran test cases? If you did, did you
manage to use llvm-gfortran or did you use any of the fortran converters?


Hi Tobi,

Sorry, but no, I haven't run any of the fortran tests. Just the C/C++ ones.