Chris Lattner
2009-Dec-15 01:05 UTC
[LLVMdev] detailed comparison of generated code size for LLVM and other compilers
On Dec 14, 2009, at 5:01 PM, Anton Korobeynikov wrote:>> Aha, this explains some apparently bizarre results such as the >> second one >> (018427, d) on this page: > Right. However, I saw the opposite case with sse2 code being 4x larger"return 1.0" is an example that is larger with SSE codegen, because the ABI requires stuff in the FP stack. X86-64 doesn't have this issue. -Chris
Renato Golin
2009-Dec-15 09:51 UTC
[LLVMdev] detailed comparison of generated code size for LLVM and other compilers
2009/12/15 Chris Lattner <clattner at apple.com>:> "return 1.0" is an example that is larger with SSE codegen, because > the ABI requires stuff in the FP stack. X86-64 doesn't have this issue.This might be a very stupid question, but can we not choose to disable SSE code generating in a case-by-case basis, even when those optimizations are turned on? In that case, I imagine that 1.0 is considered double and would normally fill one or two registers, thus easy enough to return it via registers. Unless, of course, the ABI mandates that SSE is all-or-nothing... cheers, --renato http://systemcall.org/ Reclaim your digital rights, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm
Anton Korobeynikov
2009-Dec-15 09:54 UTC
[LLVMdev] detailed comparison of generated code size for LLVM and other compilers
> This might be a very stupid question, but can we not choose to disable > SSE code generating in a case-by-case basis, even when those > optimizations are turned on? > > In that case, I imagine that 1.0 is considered double and would > normally fill one or two registers, thus easy enough to return it via > registers. Unless, of course, the ABI mandates that SSE is > all-or-nothing...ABI does not mandate the usage of SSE or x86 FP math exclusively. It just requires the FP values to be *always* returned via FP stack. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Possibly Parallel 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