Renato Golin
2009-Dec-14 23:29 UTC
[LLVMdev] detailed comparison of generated code size for LLVM and other compilers
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? --renato http://systemcall.org/ Reclaim your digital rights, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm
Eli Friedman
2009-Dec-14 23:41 UTC
[LLVMdev] detailed comparison of generated code size for LLVM and other compilers
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. -Eli
John Regehr
2009-Dec-15 00:34 UTC
[LLVMdev] detailed comparison of generated code size for LLVM and other compilers
> 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.Aha, this explains some apparently bizarre results such as the second one (018427, d) on this page: http://embed.cs.utah.edu/embarrassing/dec_09/harvest/llvm-gcc-head_clang-head/ I had been wondering about this one. John
Apparently Analagous Threads
- [LLVMdev] detailed comparison of generated code size for LLVM and other compilers
- [LLVMdev] detailed comparison of generated code size for LLVM and other compilers
- [LLVMdev] detailed comparison of generated code size for LLVM and other compilers
- [LLVMdev] detailed comparison of generated code size for LLVM and other compilers
- [LLVMdev] detailed comparison of generated code size for LLVM and other compilers