[PATCH] D38824: [X86] Synchronize the CPU predefined macros with gcc
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 11 15:47:01 PDT 2017
craig.topper added inline comments.
================
Comment at: lib/Basic/Targets/X86.cpp:844-845
- // FIXME: Historically, we defined this legacy name, it would be nice to
- // remove it at some point. We've never exposed fine-grained names for
- // recent primary x86 CPUs, and we should keep it that way.
- defineCPUMacros(Builder, "corei7");
----------------
chandlerc wrote:
> This seems to undo the idea that we should keep avoiding exposing fine-grained CPU names? What's new that changes this?
CPUs newer than the ones with that comment seem to have ignored said comment.
Probably be cause we don't have a definition for what to do for new CPUs if we aren't going to expose fine grained names. Do we just call everything corei7 forever?
================
Comment at: lib/Basic/Targets/X86.cpp:852
+ defineCPUMacros(Builder, "core_avx2");
+ defineCPUMacros(Builder, "haswell");
break;
----------------
chandlerc wrote:
> I find calling a Westmere CPU `nehalem` a little odd. Calling IvyBridge a `sandybridge' CPU seems quite confusing. But calling Skylake (client) and Cannonlake (all? client?) `haswell` seems .... deeply weird.
This implementation matches what gcc does. I agree its weird.
gcc doesn't implement cannonlake yet so i don't know what they'll do.
https://reviews.llvm.org/D38824
More information about the cfe-commits
mailing list