<div class="gmail_quote">On Sat, Jan 14, 2012 at 11:55 PM, Ghassan Shobaki <span dir="ltr"><<a href="mailto:ghassan_shobaki@yahoo.com">ghassan_shobaki@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:12pt;font-family:arial,helvetica,sans-serif"><div>I have been doing some benchmarking on x86 using llvm 2.9 with the llvm-gcc 4.2 front end.</div></div></div></blockquote><div><br></div><div>FYI, llvm 2.9 and llvm-gcc 4.2 are both quite old. It's very limited how much help you can get for those platforms. I would suggest trying LLVM 3.0 and the Clang or DragonEgg frontends.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:arial,helvetica,sans-serif"><div> 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?</div>
</div></div></blockquote><div><br></div><div>I'm not sure about the llvm-gcc implementation of the options, but understand that i386 is an extremely limiting platform to target. I would expect significant improvements when moving the code generator from i386 -> i686 and other modern processors.</div>
<div><br></div><div>However x86-64 (as one side benefit) provides a much more modern baseline for the instructions available, etc. The biggest differences past x86-64 you're likely to see are in the SIMD vector instructions available, which will only help if you have heavily vectorized code. There are a few other differences that can be significant, but far fewer than the jumps between i386 and modern x86 chips.</div>
</div>