[PATCH] D111778: [WIP][X86] Update CPU_SPECIFIC list.

Freddy, Ye via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 14 00:13:09 PDT 2021


FreddyYe added a subscriber: RKSimon.
FreddyYe added a comment.

As mentioned before:

In D108422#2957528 <https://reviews.llvm.org/D108422#2957528>, @RKSimon wrote:

> There's nothing later than CannonLake here - does Intel need to at least reference up to Tiger/Rocketlake?

I met some issues to discuss with you.

1. The feature list now I added is got from the output of -march=XXX. This version should work right with many cpus added above. But some of them don't(Functional issue).  I dig a little and found it's caused beyond this table. And the issue already exists in the old CPU added before. For example,  "core_i7_sse4_2" and "goldmont" only has one feature differs: which is "movbe", but "movebe" is not included in the table of __cpu_features in libgcc (The table is the same as the one in compiler-rt, which is `enum ProcessorFeatures`), so these two CPU_SPECIFIC won't be classified on run time.
2. Naming convention issue. `-march=goldmont-plus` v.s `cpu_specific(goldmont_plus)`. From my test, CPU_SPECIFIC probably needs other changes to support "goldmont-plus".
3. We probably need to document somewhere for all the supported CPU names on this function multiversioning.
4. CPU_SPECIFIC_ALIAS() issue. For now, CPUs defined by CPU_SPECIFIC_ALIAS is not allowed to used together with original CPU(e.g. `__attribute__((cpu_specific(sandybridge)))` and `__attribute__((cpu_specific(core_2nd_gen_avx)))`), which introduces compile error. Not sure if it is expected.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111778



More information about the cfe-commits mailing list