[LLVMdev] Building for a specific target, corei7
Varun Agrawal
vagrawal at cs.stonybrook.edu
Thu Oct 10 22:52:17 PDT 2013
Hi,
I am using the LLVM JIT infrastructure (MCJIT). I wanted to see if there are any performance gains as the compiler can detect the target CPU at runtime. But, I didn't see any improvement (I compile with -no-mmx and -no-sse).
I then tried an experiment, where I compiled the program with clang-3.3, with and without specifying the target cpu as "corei7". I was shocked to see that the only difference in the two binaries were related to "Instruction Set Extensions".
Further I tried the same experiment with gcc, and saw that the instructions were shuffled around in the binary. I expected this, because every CPU differs in some way or the other (has different buffer size for out-of-order execution, different cache sizes, etc.).
For clang, I was passing the "-march=corei7" flag.
For gcc, I was passing the "-mcpu=corei7" flag.
Am I passing the correct flags?
Any help, comments or suggestions, would be helpful.
Thanks,
--
Varun Agrawal
PhD Student
Computer Science, Stony Brook University
http://compas.cs.stonybrook.edu/~vagrawal/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131011/a6c5c399/attachment.html>
More information about the llvm-dev
mailing list