[PATCH] D83913: [X86] Change the tuning settings for pentium4 to be more modern since its the default 32-bit cpu in clang

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 08:22:37 PDT 2020


craig.topper added a comment.

In D83913#2155628 <https://reviews.llvm.org/D83913#2155628>, @spatel wrote:

> I don't object, but this is less sustainable than adding a generic 32-bit model to match the generic 64-bit model (the alternate D83897 <https://reviews.llvm.org/D83897> patch IIUC).


The "x86-64" CPU has existed for longer than 6 years. It was originally created to be the common subset between "nocona" and "k8" to be a good default CPU for any 64-bit system. It's missing cmpxchg16b for example. It picked up the generic tuning 6 years ago. But it should really have tuning for something closer to nocona/k8. If we had true mtune support, -mtune=x86-64 would tune for k8/nocona. At I think that's how it works in gcc.

> Maybe out-of-scope for this patch, but there's a bigger problem in that (AFAIK), we have no plan for updating the generic tuning. Ie, the 64-bit generic model was created 6 years ago and grows less relevant daily:
> 
>   // We currently use the Sandy Bridge model as the default scheduling model as
>   // we use it across Nehalem, Westmere, Sandy Bridge, and Ivy Bridge which
>   // covers a huge swath of x86 processors.
>    
> 
> Should we create some metrics based on time or popularity that guide us on updating that? For example, are we stuck assuming SSE2-only for the generic model forever, or can we decide that 12+ years past the introduction of SSE4.1 lets us assume that is available/preferred?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83913/new/

https://reviews.llvm.org/D83913





More information about the llvm-commits mailing list