[LLVMdev] detailed comparison of generated code size for LLVM and other compilers

Eli Friedman eli.friedman at gmail.com
Mon Dec 14 15:41:14 PST 2009

On Mon, Dec 14, 2009 at 3:29 PM, Renato Golin <rengolin at systemcall.org> wrote:
> 2009/12/14 Chris Lattner <clattner at apple.com>:
>> I'd recommend targeting (with both -march and -mtune) a simple and
>> commonly available CPU type like "core2" or "pentium4".  ICC should
>> have both of these and gcc/llvm definitely do.
> While I would say that, to be fair, the comparison should be made with
> the same options (-O3 only or something of the sort), ICC is specific
> for Intel and GCC is highly tuned to, which is not the case of LLVM.
> Still, if the target is specified, I'd assume we should enable all
> tested and proven (AFAP) optimizations to that particular platform by
> default.
> So, my question is: are those optimizations turned off by default
> because they're experimental?

The issue here is more arbitrary differences due to different default
code generation choices; for example, clang defaults to generating
SSE2 code, while llvm-gcc defaults to using x87 FP.


More information about the llvm-dev mailing list