[LLVMdev] [PATCH] Detect Haswell subarchitecture (i.e. using -march=native)
Adam Strzelecki
ono at java.pl
Thu Sep 12 08:17:18 PDT 2013
Hello,
This is my first patch on this list, however I've already submitted several trough bug tracking system. Since it probably needs some review and it's not a bug I am submitting it here.
The main intent of this patch is to detect "core-avx2" platform on Haswell i7 CPUs when running -march=native. Currently it detects it as generic x86_64.
lib/Support/Host.cpp:
* Haswell is detected for CPUID Family 6 Model 60
* Similar to Ivy and Sandy Bridge we check for AVX2 since some Haswell Pentiums are SSE4.x only
* I have marked HasAVX2 as "volatile", since otherwise it gets magically zeroed (by optimizer?) when compiling clang with latest clang build from trunk
lib/Target/X86/X86Subtarget.cpp:
* Also enabling X86::FeatureFastUAMem for Haswell
Regards,
--
Adam Strzelecki | nanoant.com | twitter.com/nanoant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-detect-haswell.patch
Type: application/octet-stream
Size: 1765 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130912/b6842ec0/attachment.obj>
More information about the llvm-dev
mailing list