[LLVMdev] -march and -mtune options on x86

Gordon Keiser gkeiser at arxan.com
Sun Jan 15 16:34:37 PST 2012


Which options are you seeing that cause the largest difference, and on which targets?   As Chandler mentioned there has been a large amount of variation in x86 targets, and there are certain optimizations that can be done, on say a Pentium (scheduling instructions which are pairable and non-dependent so the U and V pipelines are saturated without contention, for example) that don't make sense to take the time with on a true i386 target.  Likewise there were certain optimizations on the i386 such as decomposing multiplications into left shifts which generally wouldn't be needed on a modern processor.   x64 hasn't seen nearly the same amount of variation since it came into existence.

-Gordon

From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Ghassan Shobaki
Sent: Sunday, January 15, 2012 2:55 AM
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] -march and -mtune options on x86

I have been doing some benchmarking on x86 using llvm 2.9 with the llvm-gcc 4.2 front end. I noticed that the -march and -mtune options make a significant positive difference in x86-32 mode but hardly make any difference in x86-64 mode. The small difference that I am measuring when the target is x86-64 could easily be random variation, while for the x86-32 target I am measuring a huge difference on some benchmarks. Does anyone have an explanation for this? Does the llvm back end somehow ignore these options when the target is x86-64?

Thank you in advance!
-Ghassan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120115/bf35026c/attachment.html>


More information about the llvm-dev mailing list